aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes i wnat to know?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "i wnat to know??" Watch "i wnat to know??" New topic
Author

i wnat to know??

ali rafiq
Ranch Hand

Joined: Jan 09, 2003
Posts: 75
I want to the button .. i think you saw that application before .. have u ever got the illegal operation .. it has carried two button,, one is for close and the second one is "detail>>" if u click on detail the meesage box size increase and show some message .. i saw that type of application so much.. how does it make like this ...i dont want to say that makking a illegal operation.. im talking about the process of that detail button how does it make?


if u learn to break the rock .. next day u will be looking to Mountain.
Paul Stevens
Ranch Hand

Joined: May 17, 2001
Posts: 2823
???
I am not sure what you are asking.
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
I think Ali means:
When some Windows application crashes, up bops a message box that says your application has just caused a DingDong exception. There are two buttons "Close" and "Details". "Close" junks the application. "Details" expands the message box to include a stack dump detailing the boob.
Ali needs to know how to make such a gadget.
Sort of...
That's my good deed of the day. Yours is to provide the code
[ January 25, 2003: Message edited by: Barry Gaunt ]

Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
ali rafiq
Ranch Hand

Joined: Jan 09, 2003
Posts: 75
i dont speak english very well..so i have problem to explain.. im talking about the proccess in which u click the button at event of that button..the frame or a message box (or any container) get big in size... simple example to say u that button in the illagel operation.."detail>>" after click on it...
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Here's a quick code example of how to do this... basically, add the panel to the south of the contentpane, but hide it using setVisible(false). Then, in your buttons action listener, check the current name of the button. Depending on the name, swap the name of the button, get the preferred size of the details panel. If you are showing the details panel, add it's height to the height of the frame, and show it. If you are removing the details panel, hide it, then subtract it's preferred height from the height of the frame. validate() is needed after this to tell the frame it's contents need to be re-layed out again...



(NPruett - edited code lines for length...)
[ January 27, 2003: Message edited by: Nathan Pruett ]

-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
ali rafiq
Ranch Hand

Joined: Jan 09, 2003
Posts: 75
thank you for ur good example Nathan...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: i wnat to know??