Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Basic questions in Swing  RSS feed

 
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi everybody,

Q1) What is the base class for all Swing components?

Q2) What is JFC? What are the packages in it?
Q3) What is the corresponding layout for Card in Swing?
 
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A1) The base class of any Java object is:
java.lang.Object
Assuming that you know this and what you really want to know is where does Swing fit into the hierarchy:
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
...
A2) JFC - Java Foundation Classes. You are soaking in it ...
java.awt.* and javax.swing.*
Including all supporting packages (i.e.,
java.awt.event.*,javax.swing.table.*)
A3) The corresponding layout for Card in Swing is Card! Swing
makes use of all the AWT layouts and adds one more: Box.
Layouts work exactly the same for AWT and Swing:
Component.setLayout(new CardLayout());
 
amit sanghai
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thanks Manfred-- a lot!!! I am a novice in this area. Your answers really helped to clear my doubts.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you help me how to run swing in browser?what version of ie i should have? do i need plugin?what about tags in html file?please help.
regards,
ravi
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will need to have the Java Plug-in to run an applet based on swing. In your HTML you should use the <OBJECT> tag. Details can be found here.
[This message has been edited by Bodie Minster (edited January 16, 2001).]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!