September 15, 1998

Setting textfield focus

Question: I have an initially disabled TextField on a frame.When the user clicks a specific button the TextField is enabled. How do I set the input focus to the TextField

Port information

Question: I need to take a port number as input froma user. How can I check if the port numberentered by the user is free and not beingused by any

HTML browser in Java

Question: I am tring to make a stand-alone application that can read HTML files and render them like a Web browser. How can I do this in pure Java? Answer:

Textediting functions in Java

Question: I’m trying to make a text editor in Java, andI want the editor to be able to make words and even pieces of words italic, bold, or underlined. It

Copy & Paste

Question: How can I copy the selected text from a TextArea to the system clipboard or paste from the system clipboard to a TextArea? Answer: Java 1.1 introduced the java.awt.datatransfer

TextField listeners

Question: I want to capture an event that signals a user’s completed update to a TextField. Answer: In general, a user will finish entering text in a TextField by pressing

Saving Panels with TextField?

Question: I am writing a presentation application and want to take a Panel and add TextFields and maybe Images to it. Is it possible to save this Panel with TextFields

Wrapping Text in TextArea

Question: Is there a way to wrap text that is written to the TextArea? Answer: The java.awt.TextArea class does not have built-in support for wrapping text, but you can implement