• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDialog questions

 
Ashik Uzzaman
Ranch Hand
Posts: 2373
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi racnhers, please help on the following scenarios....
(1) Can i hide the title bar of a JDialog? If yes, how? I know if i dont need title bar then its better to use JWindow....but i need JDialog in my case.
(2) Say my parent JWindow or JFrame has 5 JDialogs....then when i click on one dialog i want all the other dialog boxes to go in the back or be minimized/disabled and my activated dialog come front with visibilty. I am facing problem with this...
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, I don't believe you can get rid of the title bar of a JDialog.
My question is why so many JDialogs all at once? And are they all modal?
Maybe if you explained to us what you are doing, we could help you figure out the best way to go about it. Maybe help you with some design issues??
 
Ashik Uzzaman
Ranch Hand
Posts: 2373
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thnx Gregg, I know u r always helpful.
For the first title bar problem, ya i also think so but wanted some suports...
For the secodn issue, my frnd & colleague Wahid Sadik showed me from swing API that there is a method for JInternalFrame moveToFront(JInternalFrame f) to select among a bunch of internal frames which one to come out at first. So the problem is partially solved....now just if i can manage another method for JDialogs that would be excellent....yet to find out one...
We r working in a medium-large project using Swing, Beans, Oracle, XML & some popular design patterns with Java.
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I did some testing with some NON-MODAL JDialogs and found out that there is a toFront() method just like with all other Windows that will pull whatever JDialog you want to the front. However, If your JDialogs are MODAL, then the problem lies with the nature of MODAL windows. When a window is MODAL, then as soon as you set it to visible(true), any other events that take place after that line of code in the event are put on hold until that MODAL window gets terminated. So without knowing what you need your program to do, it is kind of hard to figure out an alternative for you.
My main question is why so many JDialog Windows and are they all MODAL?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic