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



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

Have Programming Question? Ask it here!
 
 
 


rajesh
How to create a Java Runtime Editor
2 Answer(s)      4 years and 10 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
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
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
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
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 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
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
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
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 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
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 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
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
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  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
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
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  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
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
java runtime error - Java Beginners
java runtime error  import java.io.*; class Test { public static... and set the following: JAVA_HOME=C:\Program Files\Java\jdk1.6.0; Path=C:\Program Files\Java\jdk1.6.0\bin; Thanks  Hello Friend, I am thankful
Java runtime not working - Java Beginners
Java runtime not working  import javax.swing.*; import java.awt.... SwingFrame(){ JFrame f = new JFrame("Frame in Java Swing"); f.getContentPane...("Frame in Java Swing"); f.getContentPane().setLayout(null); JLabel lbl1 = new
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
how to create executable - Java Beginners
how to create executable  How do i create a executable file from a java file thnks in adv...!  Hi Friend, Try the following code: import java.io.*; import java.util.jar.*; public class CreateExe { public
JDBC:Runtime error - Java Beginners
JDBC:Runtime error  Dear sir/madam i am facing a problem with jdbc program. When i run my program using NetBeans6.1 it is working fine. When i try... | Templates * and open the template in the editor. */ package billerdetailsupload
JDBC:Runtime error - Java Beginners
JDBC:Runtime error  Dear sir/madam, thanks to respond for my request. I tried as you said but still i facing the same problem no suitable drivers... in the editor. */ package billerdetailsupload; import java.sql.*; import
how create package of this java code
how create package of this java code  Hi,i have email code in java which is working fine with out making package but when i want to make package of this code its stop working.Its showing exception while I execute it.I have to use
how create package of this java code
how create package of this java code  Hi,i have email code in java which is working fine with out making package but when i want to make package of this code its stop working.Its showing exception while I execute it.I have to use
Java runtime error - JSP-Servlet
Java runtime error  Following Error is showing when i way scanner.acquire() can any body help me please uk.co.mmscomputing.device.sane.SaneIOException: uk.co.mmscomputing.device.sane.SaneDeviceManager.getDevice
Java runtime example - JSP-Servlet
Java runtime example  in eclipse after submiting the data throgh jsp page i got the following error com.microsoft.sqlserver.jdbc.SQLServerException: The value is not set for the parameter number 1. the code is: Bean
Error during runtime NoClassDefFound in java
Error during runtime NoClassDefFound in java  code: package Jama...[n-1][n-1] - H[n][n]) / 2.0; q = p * p + w; z = Math.sqrt(Math.abs(q)); H[n][n] = H[n][n] + exshift; H[n-1
Error during runtime NoClassDefFound in java
Error during runtime NoClassDefFound in java  code: package Jama...[n-1][n-1] - H[n][n]) / 2.0; q = p * p + w; z = Math.sqrt(Math.abs(q)); H[n][n] = H[n][n] + exshift; H[n-1
how to create exce sheet using java
how to create exce sheet using java  how to create excel sheet using java
how to create an excel file using java
how to create an excel file using java  how to create an excel file using java
jsp runtime error - Java Server Faces Questions
jsp runtime error  how to lock and unlock the folder by using jsp programming
how to create a header in jtable using java swing
how to create a header in jtable using java swing  how to create a header in jtable using java swing   d
i need a java code for finding typemismatch in an editor.
i need a java code for finding typemismatch in an editor.  hi im sriram, i need a java code in such a way that typemismatch code is embedded with the simple java editor. the sample output is shown below !alt text
how to create pdf file using java and itextjar
how to create pdf file using java and itextjar  How to create pdf file having paragraphs and alignments done using java and itextjar 5.10 version.? hope i get quick response
how to create pdf file using java and itextjar
how to create pdf file using java and itextjar  How to create pdf file having paragraphs and alignments done using java and itextjar 5.10 version.? hope i get quick response
java runtime error: JDBC code - Java Beginners
java runtime error: JDBC code  Hi i want to insert data into mysql database in my local system. I installed mysql5.0 and using mm.mysql-2.0.4-bin.jar and also set in the class path. the code is compilled and giving runtime error
 

 

 

DMCA.com