• Post Reply Bookmark Topic Watch Topic
  • New Topic

Swing pacakage

 
Anna Hays
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When it says we must use swing, it doesn't mean we can only use from javax.swing package is it? we can use java.awt etc still right? Just to make sure...
 
Satish Avadhanam
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Anna Kafei:
When it says we must use swing, it doesn't mean we can only use from javax.swing package is it? we can use java.awt etc still right? Just to make sure...

Yep. We can...
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Posts: 12059
232
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Anna,
You can use AWT where necessary (for example using one of the layouts), but where there is a Swing equivalent, you should use it (e.g. don't use Button when you can use JButton).
Regards, Andrew
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!