Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Swing-AWT How to create a Java Runtime Editor
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


rajesh
How to create a Java Runtime Editor
2 Answer(s)      5 years and 2 months ago
Posted in : Swing AWT



Advertisement
View Answers

November 10, 2009 at 10:59 AM


Hi Friend,

If you want to generate an editor using java swing, try the following code:

import java.awt.BorderLayout;
import java.awt.Container;

import javax.swing.JEditorPane;
import javax.swing.JFrame;
import javax.swing.JScrollPane;

public class CreateEditor {
public static void main(String args[]) {
JFrame f = new JFrame("Editor");
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Container content = f.getContentPane();
JEditorPane editor = new JEditorPane();
editor.setEditable(true);
JScrollPane scrollPane = new JScrollPane(editor);
content.add(scrollPane, BorderLayout.CENTER);
f.setSize(300, 200);
f.setVisible(true);
}
}

Hope that it will be helpful for you.
Thanks
Thanks


November 10, 2009 at 11:07 AM


/*******************************************************************

If you want to generate an editor using java swing, try the following code:

import java.awt.BorderLayout;
import java.awt.Container;

import javax.swing.JEditorPane;
import javax.swing.JFrame;
import javax.swing.JScrollPane;

public class CreateEditor {
public static void main(String args[]) {
JFrame f = new JFrame("Editor");
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Container content = f.getContentPane();
JEditorPane editor = new JEditorPane();
editor.setEditable(true);
JScrollPane scrollPane = new JScrollPane(editor);
content.add(scrollPane, BorderLayout.CENTER);
f.setSize(300, 200);
f.setVisible(true);
}
}

Hope that it will be helpful for you.
Thanks
Thanks

************************************************************************/

Thnx for your reply.

Actually the requirement is like below..

1.An editor in which user can write java code..
I mean java programs and if user will type an object name then respective method names should come up in drop down..
Similar to eclipse / netbeans..
But the editor should have some jar files, those I can use in my swing application .

2. It should also give compilation errors.


Related Tutorials/Questions & Answers:
How to create a Java Runtime Editor - Swing AWT
How to create a Java Runtime Editor   Hi, I am working on a requirement in which I need to integrate a java runtime editor in swing application... want to generate an editor using java swing, try the following code: import
How to create Runtime time jLabel in java swing ?
How to create Runtime time jLabel in java swing ?   hi sir. my... difficulties in creating jLabel at runtime according to user input. user will itself enter the number of Jlabel that will create on Panel. if user enter-3, ther
Advertisements
java how to create visual swing editor
java how to create visual swing editor   How do I create a visual swing designer in java ?Meaning that I can "draw" a button,a JTextArea from within my designer program . I just need some basics . I've got no idea how to start
java runtime error - JDBC
java runtime error  when i m running my program using type1 driver it is showing a runtime error of SQLException of unable to create the connection object.please give the solution
how to create notepad in java
how to create notepad in java  how to create notepad in java
Rich Text Editor in java
Rich Text Editor in java  Hello Sir, Am in a need of working with rich text editor in java. The technologies am using are java with gwt. Am able... to create image from the whole text area which contains, images, text, styles
How to create a class in java
How to create a class in java  I am a beginner in programming and tried to learn how to do programming in Java. Friends please explain how can I create a class in Java
text editor in java
text editor in java  hi friends, i want to do a mini project in programmers editor with syntax based coloring in java. i have no idea about this project and i dont know the java lang also.from now only i have to learn. please
java runtime error - JDBC
java runtime error  when i m running my program by using jdk1.6.0 then it is giving the error of classunsupported major.minor version 50.0.to remove... version error 49.0.so, please suggest how will i compensate this problem
how to add fields at runtime in j2me
how to add fields at runtime in j2me  How can I add fields at runtime in my form? How can I switch screens and can add fields at runtime? Thanks Dhruv
How to Create Keyboard in JAVA
How to Create Keyboard in JAVA  please help me to create On-Screen Keyboard with java and please give me an another idia to make it ..............iam waiting for your help ,think u so much
How to create charts in Java?
How to create charts in Java?  Is there any example of creating charts and graphs in Java? thanks   Hi, check the tutorial: Chart & Graphs Tutorials in Java Thanks
Java Runtime
Java Runtime       In this section, you will learn about Java Runtime Environment (JRE), it also known as Java Runtime. This is a part of Java Development Kit (JDK). It is a set
how can create pop() method in this program ,Or how can delete image in it when i press pop button in runtime ??? please help me ...
how can create pop() method in this program ,Or how can delete image in it when i press pop button in runtime ??? please help me ...   ...(new BorderLayout()); //Load the pet images and create an array of indexes
runtime error in java
runtime error in java  What is Run time error in Java?   Run time error is a syntax error that during the execution of a program.It hash... the link, may this will be helpful for you. http://www.roseindia.net/java/java
java runtime exception - JDBC
java runtime exception  while i executing this source code:- import java.sql.*; public class MysqlConnect { public static void main...(); } } } i got an exception that classnotfoundexception . how can i remove
runtime error - Java Beginners
runtime error  I created a sample java source ,compiled it succesfully using command prompt but when i tried to run i got the folowing error " Exception in thread "main" java.lang.UnsupportedClassVersionError" I have set
java runtime error - JDBC
java runtime error  when i m running my jdbc program it is giving the problem as class not found exception.so, please suggest me what may be the solution regarding this.  Hi friend, The problem is of Jar
java runtime error - JDBC
java runtime error  when i am running my jdbc program using thin driver this error is coming at runtime: Exception in thread "main... to this : Thrown when the Java Virtual Machine attempts to read a class file
java runtime error - JDBC
java runtime error  sir when i m running the jsp connectivity program it is giving the error as follows:' java.lang.NullPointerException at jsp_servlet.__resplogin._jspService(__resplogin.java:237
how to create interfaces in java
how to create interfaces in java  HI, Here is my code public interface validateInfo { public void validate(String empcode, String password); } class updateInfo implements validateInfo { public void update() { //code
java runtime error
java runtime error  hi friends i am trying to run the fallowing... ch; choice = JOptionPane.showInputDialog(null, "1. Create Employees Table\n"+ "2. Create Products Table\n"+ "0. Exit\n\n"+ "Enter your choice
how to create reports in swing java?
how to create reports in swing java?  how to create reports in swing java
runtime error - Java Beginners
runtime error  sir run time error is coming again in this code also null pointer Exception at for( File f:contents) import java.io.*; public class RecentDocumentsDelete { public static void main(String[] args) { String
runtime error - Java Beginners
runtime error  import java.io.*; public class RecentDocumentsDelete { public static void main(String[] args) { String currentUser = System.getProperty("user.name"); System.out.println(currentUser
how to color the Eclipse editor background programmatically?
how to color the Eclipse editor background programmatically?  I have to color specific portion(background) of the of the Eclipse editor by running the java programm and provided that do the coloring from a given line number
How to create first program in Java?
How to create first program in Java?  Hi, I am new in Java programming. Tell me How to create first program in Java? Thanks   Hi, Read more at First Java Program. Thanks
java runtime error - Java Beginners
java runtime error  sir, i have installed jdk in my system.i had also set path.But i am unable to run the compiled class file.it shows run time...://www.roseindia.net/java/java-classpath.shtml Thanks
Java Runtime error - Java Beginners
Java Runtime error  I have designed a simple chat application where the client and the server is the same computer itself. I have used the ipaddress of my computer and then designed a GUI application to interact between the two
Editor
Editor  sir i want to develop a menu programe in java so sir i want to a file menu which have open dialog and save dialog and in edit menu have find option
java runtime error - Development process
java runtime error  I Migrated jdk1.3 to jdk1.4. after that my ftp clint not working.iam getting class not found exception fileinputstreem. i am using sun package. can any one send pure java code for FTP process i think jdk
Advertisements
 

 

 

DMCA.com