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

 
 


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

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 Pages:
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
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
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 - 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
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
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 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
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
runtime polymorphism - Development process
runtime polymorphism  how run time polymorphism is achieved ... information,please visit the following links: http://www.roseindia.net/java/master-java/method_overriding.shtml http://www.roseindia.net/java/javascript-array
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
TextPad Editor + JDK
Java NotesTextPad Editor + JDK 1. Download and install the Java JDK if necessary Install the J2SE JDK. See Java Development Kit (JDK). 2. Download...\jdk1.5.0_04 There will also be a "JRE" (Java Runtime Environment
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
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
Simple Editor
Java: Example - Simple Editor This simple text editor uses... // editor/NutPad.java -- A very simple text editor -- Fred Swartz - 2004-08... contentPanel() { //-- Create components. mEditArea = new
create
create  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 JSP Page
How to Create JSP Page       In this section we will show you how you can create JSP page and then test... can be used. In this example I will show you how to create a simple JSP page
Runtime Class
Runtime Class  How can we halt d execution withd help of exit(arg) method?? ...pls tag a code
ck editor
ck editor  how to read ck editor content and insert in database through struts2
Try it Editor
Try it Editor  Hello sir...actually i want to add an html,css & js editor like in w3 school try it editor 1.5....can you tell me how i can add it..pllz plzzz rppy soon
HTML Editor Open Source
Sferyx JSyndrome HTMLEditor Applet Edition is a visual HTML Editor Java Applet...HTML Editor Open Source Bluefish  HTML Editor Bluefish is a powerful editor for experienced web designers and programmers. Bluefish supports
thread runtime process
thread runtime process  Java thread runtime process
How to create XML file - XML
How to create XML file  Creating a XML file, need an example. Thanks!!  To create XML file you need plain text editor like note pad. After...()); }}Thanks  Hi,Java programming language has many API's to create xml file from
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 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
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 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
Open Source XML Editor
couldn?t wait. (NetNews Wire?s weblog editor uses XML-RPC heavily; it?s how...Open Source XML Editor Open source Extensible XML Editor The Xerlin Project is a Java? based XML modeling application written to make creating
want to ask how to update data for runtime selected multiple checkboxes
want to ask how to update data for runtime selected multiple checkboxes ... and created runtime textboxes in the grid for the column geocoordsN,GeocoordsE I... for more than One checkbox here is my code. <%@ page language="java" import
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
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
Text Editor Image upload
Text Editor Image upload   how to browse an image from text editor instead of giving url of particular image using javascript
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 create reports in swing java?
how to create reports in swing java?  how to create reports in swing java
JSP handle runtime exceptions
JSP handle runtime exceptions  How does JSP handle runtime exceptions?   Using errorPage attribute of page directive and also we need to specify isErrorPage=true if the current page is intended to URL redirecting
How to create form in Swings
How to create form in Swings  How to create registration, login and question form in Java Swing?   Creating different forms in Java Swing - Examples how to create registration form in swing swing login form example
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
how to create a table
how to create a table  create table tablename (name varchar(10),name.... Use the following query: create table tablename (name varchar(10),address varchar(10)); For more information, visit the following link: Java Create
WYSIWYG html editor in JSP
WYSIWYG html editor in JSP This tutorial explains how to create WYSIWYG html editor in JSP. This example is created in eclipse IDE and run on tomcat server. We will use jQuery and jquery.wysiwyg for creating WYSIWYG html editor
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
Not able to display jtable at runtime
Not able to display jtable at runtime  Hello, can anyone please help me. I am trying to create a dynamic table with checkboxes. Data are accessed from database. But it is not creating the table at runtime. It retrieves data from

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.