Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JFrame or JDialog

 
Randall Twede
Ranch Hand
Posts: 4385
3
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i want to add a fade feature to my Paint application. i want a JMenuItem called Fade that pops up either a dialog or frame that has a JSlider and a JButton. which should i use?
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to pop up a window which asks the user to enter some information, then a JDialog is the answer. However if you want this window to be more permanent than that, and if you want it to stick around while the user does things with your main JFrame, then a JFrame is the answer. Or maybe something else: here's the tutorial about Using Top-Level Containers.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic