File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

i wnat to know??

 
ali rafiq
Ranch Hand
Posts: 75
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Paul Stevens
Ranch Hand
Posts: 2823
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
???
I am not sure what you are asking.
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
ali rafiq
Ranch Hand
Posts: 75
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4121
IntelliJ IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
ali rafiq
Ranch Hand
Posts: 75
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you for ur good example Nathan...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic