How to create a Java Runtime Editor

Ads

 
 

Share on Google+Share on Google+

rajesh
How to create a Java Runtime Editor
2 Answer(s)      7 years ago
Posted in : Swing AWT
Ads
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.

Ads









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
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
Advertisements
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
how to create notepad in java
how to create notepad in java  how to create notepad in java
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
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 to create reports in swing java?
how to create reports in swing java?  how to create reports in swing java
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
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
How to create and use Array in Java?
How to create and use Array in Java?  Hi, How to create and use Array in Java? Write program to construct and use the array. Thanks   Hi... can read complete example at Array in Java. Thanks
How to create runtime drag and drop form builder using asp.net mvc and jquery
How to create runtime drag and drop form builder using asp.net mvc and jquery  My task is related to Runtime drag and drop Form Builder. I have to design a dynamic form builder in which user has permission to drag the control
How to create first Java Program?
How to create first Java Program?  Hi, I am beginner and I want to write first Java program. How I can setup my machine and write first Java program... and run first Java program: Create program in Note pad: Step 1: Open
how to create users in LDAP using java?
how to create users in LDAP using java?  how to create users in LDAP using java
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
how to create an excel file using java
how to create an excel file using java  how to create an excel file using java
how to create exce sheet using java
how to create exce sheet using java  how to create excel sheet using java
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
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
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 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
how to create month wise serial number in java?
how to create month wise serial number in java?  Ex: For 1)January-serial number is 1/001,1/002,1/003 etc
How to Create Car Rental Application in Java ?
How to Create Car Rental Application in Java ?  Hi, How to Create a Car Renal Application using Java to Check the Car renting, booking... the car rental apps 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
how to create unit matrix in java of arbritary dimensions
how to create unit matrix in java of arbritary dimensions  i want to create the unit matrix of arbritary dimensions say (n*m).i m a new beginner to java.someone having the program for that? help would be appreciable
how to create SOAP based web service in java?
how to create SOAP based web service in java?  Hi, I want to create sample SOAP web-service based application using jsp/servlet. Please help me
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 new arraylist using Java
someone provides online example how to create new arraylist in java programming. thnaks,   Hi, In java programming language you can create new...How to create new arraylist using Java  hi, I want to develop
How to save file in vi editor?
How to save file in vi editor?  Hi, I am trying to find commands to save the file in the vi editor? Can anyone show me the example and explain me the commands? Thanks   Hi, Here are the details: How to save file