Text « Text Input « Java Swing Q&A





1. Can anyone recommend a Java rich text editor?    stackoverflow.com

The rich text editor must be implemented in Java, provide Swing support, and preferably be open source. I'm looking to integrate it into an existing Java/Swing application. Thanks.

2. Getting the removed text from a Java text component    stackoverflow.com

A JTextComponent allows you to add a DocumentListener to its Document, which will tell you when text was added or removed, and the offset and length of the change. It ...

3. Setting Text in a JFormattedTextField    stackoverflow.com

I'm using the code snippet below to create a JFormattedTextField. When entering values via the GUI text field the formatting works as expected. However, when I programmatically set the value the ...

4. SWING text editor with basic functionality    stackoverflow.com

The story behind: I'm a lazy ass. What I need: I'm writing my thesis/disseration (I don't know how do you call it in english right now, and since I'm a lazy ass, I shall ...

5. Java Swing text editor throws NullPointerException    stackoverflow.com

Alright... I'm starting out with Java and I've stepped up to Swing GUI. Everything was going fine until I tried to work with file input and output.

    /*
 ...

6. What is best control in Java for simple editor    stackoverflow.com

I need to implement light editor ( recognize part of key words, syntax highlight and suggest all of word in dropdown list if user type part with same prefix). What is ...

7. Better choice: TextLayout or JTextComponent for an "ellipse with editable text" component?    stackoverflow.com

If you've ever used Visio or a UML class diagram editor, you have an idea of what I'm trying to accomplish: Within a JFrame, users can add ellipses that enclose a ...

8. Integrate a text editor in Java desktop application    stackoverflow.com

I would love to find a solution to integrate a simple text editor in a Java desktop application using Swing! (like tinyMCE in an HTML)

9. Int vs Text on setText for jbuttons    bytes.com

P: 10 Noonga I have tried to search, maybe I did not locate the right information since I am new to these forums and new to java, but, I have a ...





10. Custom tags for javax.swing.text.html.HTMLDocument    forums.netbeans.org

Hello every one! I'm having some trouble on this and I really apreciate if someone could help me. I'm extending the default javax.swing.text.html.HTMLDocument, javax.swing.text.html.HTMLEditorKit, javax.swing.text.html.parser.Parser, javax.swing.text.html.parser.DTD, and a lot of other classes to include my own tags on the grammar and It seems to be working fine... for example, I can define:

11. text-editor - toolbar please    coderanch.com

// Create the toolbar toolBar = new JToolBar(); // Add some buttons exitButton = new JButton(new ImageIcon(getClass().getResource("go_to.gif"))); exitButton.setToolTipText("Exit"); exitButton.addActionListener(this); loggingButton = new JButton(new ImageIcon((logToFileItem.isSelected() ? getClass().getResource("logging-on.gif") : getClass().getResource("logging-off.gif")))); loggingButton.setToolTipText((logToFileItem.isSelected() ? "Logging is enabled" : "Logging is not enabled")); loggingButton.addActionListener(this); emptyButton = new JButton(new ImageIcon(getClass().getResource("empty.gif"))); emptyButton.setToolTipText("Delete all rows from table"); emptyButton.addActionListener(this); // Add the buttons to the toolbar toolBar.add(exitButton); toolBar.add(loggingButton); toolBar.add(emptyButton); // ...

12. Text editor question...    coderanch.com

13. Building a text editor    coderanch.com

Hi folks, I'm building a simple text editor using a JEditorPane and simple I/O streams - so far, it works like a charm. My only question is this: I have the capability to change text colour, text font, and apply attributes like bold, italic etc. without problem. Unfortunately, changing the text attributes will change ALL of the text as opposed to ...

15. Text Editor Design Question    coderanch.com

16. Right click in text editor    coderanch.com





17. how to align the text in the editor????    coderanch.com

18. Text Editor    coderanch.com

Hi, I'm trying to write a small program which converts between text and html. The user edits the text in a JTextPane, selects bits of it and presses bold, italic buttons etc to format it. This works fine, but I want to convert the formatting to html tags when a button is pressed and I can't find any simple tutorials. I ...

19. How to make a text editor using GEF    coderanch.com

is here a wrong place to ask the question? as I know now,I can use org.eclipse.draw2d.text package to display text,just like this: private void createComposite() { LightweightSystem lws = new LightweightSystem(sShell); FlowPage page=new FlowPage(); BlockFlow blockFlow=new BlockFlow(); page.add(blockFlow); TextFlow text0=new TextFlow(); text0.setText("test string1 in color green"); text0.setForegroundColor(ColorConstants.green); TextFlow text1=new TextFlow(); text1.setText("test string1 in color blue"); text1.setForegroundColor(ColorConstants.blue); blockFlow.add(text0); blockFlow.add(text1); lws.setContents(page); } but ...

20. Text Editor in swing    coderanch.com

Hi, I have to create a text editor for my client wherein he can edit the text and then generate a report for this form. I'm using the java print API for generating the reports, but I can't figure out which components to use to create the editor. Currently, I've created it using DnD api,where there's an option to add labels ...

22. SWT: app close when trying to change text.setText()    coderanch.com

Hello, im new to Java and have run into a jam. Im using Eclipse to develop my application. When ever i try and change the text of a text_box my program crashs with the follow error message: Exception in thread "main" java.lang.NullPointerException at MainWin$5.widgetSelected(MainWin.java:301) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3125) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2758) at MainWin.main(MainWin.java:103) Heres some snippets of my ...

24. Problem inserting text after hyperlink    coderanch.com

25. Rich Text Editor,    coderanch.com

Hello All, Am working on a screen wherein its much of like a Text Editor. I need to provide all the functionality available in most of editors like, making the text BOLD, ITALIC, UNDERLINED, ALIGNMENT etc.. Am very fresh to SWT, and i need to do this using the SWT. It would be helpful if any body could tell me that ...

26. JFileChooser /text editor Help    coderanch.com

I am trying to open a txt file in a JTextArea. I know I have to use the .read() method, but how is executed so that the entire file can be viewed in my textArea? I am trying to create a simple text editor(like notepad) and I can't find any helpful tutorials to help me through this process. Why does Java ...

27. Swing WYSIWYG rich text editor component    coderanch.com

Hi, I'm looking for a open source Swing WYSIWYG rich text editor component. i searched the web but was surprised there is No such component available at the moment .However this component is very important and should be already developed by the swing developers community. does anyone know of such swing component? thanks

28. Text Editor    coderanch.com

I have a project .. it's a bout making a text editor just like the Word I'm making it with java , net Beans but the headmaster wants me to use canvas ... It means we are dealing with letters as images I'm facing a trouble with dividing the canvas into rows & columns ... My headmaster had mention the gridlayout ...

29. embedding a Processing Applet in SWT (Eclipse RCP), otherwise I'd need a text editor engine    coderanch.com

I'm having difficulties on more than one level and I hope some Eclipse plugin specialists here can help. Maybe you can also learn something. First off some motivation: I'm working on a tiny hobby framework for programming Pixelshaders and other scripts with immediate user feedback (pressing enter, see the result). I want to use Processing, which is based on Java Applets, ...

32. basic text editor in Swing    java-forums.org

33. [SOLVED] [newbie] AbstractButton.setText() not setting text within JButton    java-forums.org

I have this calculator program and it does not seem to clear the display text. So when I select the '=' the previous text does not clear. :confused: Java Code: CalculatorPanel.java package homenetwork.bkr.training; import java.awt.*; import java.awt.event.*; import javax.swing.*; @SuppressWarnings("serial") public class CalculatorPanel extends JPanel { public CalculatorPanel() { setLayout(new BorderLayout()); result =0; lastCommand = "="; start=true; //add the display display ...

35. reading HTML file using javax.swing.text.html.HTMLDocument    forums.oracle.com

THis code works fine for HTML file - College Culver-Stockton College &nsbp; But it doesn't works for - College

36. Swing Rich Text Editor Component    forums.oracle.com