How to setup focus for JFrame

Joined
Nov 12, 2009
Messages
2
Reaction score
0
Hi,
Is anyone knows how to pop up a frame.
When my frame is called it is behind the calling window. So I need to minimize calling window and see the frame. However when I call it for the second time it is on top. Is it possible to force my frame to be on top from the first time? Could it be because of Windows XP or Internet Explorer settings? I already tried toFront, show, setVissible etc.

JFrame frame = new JFrame("TA MESSAGE");
//frame.toFront();
//frame.show();
//frame.setLocationRelativeTo(null);
//frame.setVisible(true);

JTextField zone1 = new JTextField();
JTextField slot1 = new JTextField("", 2);
Object[] message = new Object[]
{
"ZONE:", zone1, "SLOT:", slot1
};

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,266
Messages
2,571,078
Members
48,772
Latest member
Backspace Studios

Latest Threads

Top