Meaningless Drivel is fun!
The moose likes Swing / AWT / SWT and the fly likes JFrame or JDialog Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JFrame or JDialog" Watch "JFrame or JDialog" New topic

JFrame or JDialog

Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4351

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?

Visit my download page
Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

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.
I agree. Here's the link:
subject: JFrame or JDialog
jQuery in Action, 3rd edition