Jump to content
Forum Roportal
Sign in to follow this  

frame in TOP

Rate this topic

Recommended Posts


Am un cod ceva de genul:


   public static void createAndsowGUI() {

       //Macae sure we have nice window decorations.


       //Create and set up the window.

       JFrame frame = new JFrame("PasswordDemo");


       //Create and set up the content pane.

       final IntroducerePassword newContentPane = new IntroducerePassword(frame);

       newContentPane.setOpaque(true); //content panes must be opaque


       //Macae sure the focus goes to the right component

       //whenever the frame is initially given the focus.

       frame.addWindowListener(new WindowAdapter() {

           public void windowActivated(WindowEvent e) {




       //Display the window.





Cand este executat, o fereastra in care mi se cere o parola apare pe ecran. Problema este ca apare undeva in spatele tuturor ferestrelor active. Cum as putea sa o fac sa apara in fata acestora?

Share this post

Link to post
Share on other sites

Managerul de ferestra din Java e altul decat cel din Windows, nu poti face sa apara in fata. Implicit, orice fereastra noua de Windows se deschide in fata celorlalte, exceptand cele care sunt always-on-top.

sa-ar putea sa fie setat altfel calculatorul tau, fereastra ar trebui sa se deschida deasupra.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this