This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Minimize and Maximize button in JDialog

 
chithra rasavelu
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I need to add minimize and maximize button in the titlebar of JDialog. Is there a way to do this?
 
Michael Dunn
Ranch Hand
Posts: 4632
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
where are you going to minimize it to?
 
chithra rasavelu
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to minimize it to the parent window which is a frame.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so, it's going to sit as a tiny icon, somewhere on the frame?
then click the icon to restore?

if that's what you're trying, one way might be:
set the dialog as undecorated,
build your own titleBar, adding min/max(restore)/X buttons
add the titleBar at borderLayout.NORTH of the dialog
add a motionListener to the titlebar, so the dialog can be dragged to a new location
add a border to the dialog
 
Ranganathan Kaliyur Mannar
Bartender
Posts: 1101
10
Java Netbeans IDE Ubuntu
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think what you actually need is JDesktopPane and JInternalFrame.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic