jQuery in Action, 3rd edition
The moose likes Swing / AWT / SWT and the fly likes JFrame, JTextArea, JOptionPain, JApplet? Clarification? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JFrame, JTextArea, JOptionPain, JApplet? Clarification?" Watch "JFrame, JTextArea, JOptionPain, JApplet? Clarification?" New topic

JFrame, JTextArea, JOptionPain, JApplet? Clarification?

Travis Gn

Joined: Sep 11, 2003
Posts: 19
1. What are the differences between JFrame, JTextArea, JOptionPain, JApplet?

2.I am working with a JFrame and need to print a line on the viewable area, do I just need to add a container? If so what is the syntax? any info will help.

I need more help!
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
Creating a GUI with JFC/Swing in the java tutorial is a good resource for learning more about these components and how to use them. This example app shows the first three and demonstrates how to draw a line in a JFrame.
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
Moving this to the Swing / JFC / AWT forum...

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Steve JK

Joined: Jun 16, 2004
Posts: 5
Hi Travis,

To answer your first question, a JFrame is effectively an application window (i.e. title bar, minimise/maximise/close buttons etc).

A JTextArea is a field in which text can be entered and displayed in.

A JOptionPane is a window that is displayed that can contain an option that you wish to present to the user (e.g. are you sure you want to exit without saving? [yes or no]).

Finally, A JApplet is a web based java application that usually runs within a web browser window on a web page.

Hope that helps

Happy Coding all!
I agree. Here's the link: http://aspose.com/file-tools
subject: JFrame, JTextArea, JOptionPain, JApplet? Clarification?
It's not a secret anymore!