Java GUI Framework Question: Download Questions PDF
How to make sure a window is always on top of all other windows using AWT or Swing?
![Java GUI Framework Interview Answer Java GUI Framework Interview Question](https://globalguideline.com/public/images/interview/11.png)
Answer:
Before Java 1.5 you couldn't:
AWT and Swing didn't provide this feature. All you could do was to use a (modal) [J]Dialog, and make sure the [J]Dialog is provided with the correct parent/owner in the constructor.
Since Java 1.5:
Window.setAlwaysOnTop(), which is inherited by the other top-level containers like JFrame.
AWT and Swing didn't provide this feature. All you could do was to use a (modal) [J]Dialog, and make sure the [J]Dialog is provided with the correct parent/owner in the constructor.
Since Java 1.5:
Window.setAlwaysOnTop(), which is inherited by the other top-level containers like JFrame.
Download Java GUI Framework Interview Questions And Answers
PDF
Previous Question | Next Question |
What is Qt Jambi? | How to (de)iconify a window? |