Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

JFrame, JTextArea, JOptionPain, JApplet? Clarification?  RSS feed

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the Swing / JFC / AWT forum...
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!