473,770 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

JFrame to Front

Hi,

First of all sorry for my german posting before!

Here is my question in english:

By starting my application I construct a JFrame. By clicking onto a
JButton on this JFrame, it construct a NON-MODAL JDialog, which gets as
parentComponent the JFrame.
Now, if I switch between the Frame and the Dialog, they are correctly
activated, but the Frame does never come to foreground, i.e. it is ever
ovelapped by the Dialog.

I tryed with "Frame.setVisib le(true)", "Frame.toFront( )" and
"Frame.show ()", but unfortunately, it does not work.

Is my desired behavior in this case even possible, or is there only the
way of setting the parentComponent of the Dialog to null?

Thanks!
--
Oliver Hirschi
http://www.FamilyHirschi.ch

Aug 16 '05 #1
0 5202

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3327
by: Tuno | last post by:
I'm relatively new to Java Swing programming. I have a console application that processes text files and while doing so I want to suspend the execution when an error is encountered that requires the user to make a choice. I want to do that with my own JFrame that allows the user to edit the bad data in a GUI and then click "Accept" or "Ignore". If the user clicks "Accept", the JFrame contributes the data to the standard output being...
5
6859
Shinzon
by: Shinzon | last post by:
ok so far I have got: JFrame frame = new JFrame( "Matt's DVD's" ); frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE ); frame.setSize( 420, 170 ); // set frame size frame.setVisible( true ); // display frame JLabel label = new JLabel("Text Label");
5
6924
Shinzon
by: Shinzon | last post by:
Ok so I have been working on this for a moment now and wondering how to add multiple jlabels to a jframe. the code looks like this: JLabel jl = new JLabel("DVD ID #= " + dvd); //Displays DVD id JLabel j2 = new JLabel("Name of DVD = " + dvd); //Displays dvd name JFrame frame = new JFrame( "Matt's DVD's" ); // Sets frame for label frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
3
1815
by: coffeetime | last post by:
Hi, I just decided to learn java, so I'm quite a noob. I use the book learning java third edition. have JDK 1.6 program in notepad. I have made the simple HelloJava example, and now i wanted to make the one in the frame. but when i try to compile the .java file i get following error: C:\Program Files\Java\JDK1.6.0_05\bin>javac HelloJava.java (the file is located in the bin map) HelloJava.java:5: cannot find symbol symbol : class JFrame
3
2423
by: coffeetime | last post by:
Hi, I just decided to learn java, so I'm quite a noob. I use the book learning java third edition. have JDK 1.6 program in notepad. I have made the simple HelloJava example, and now i wanted to make the one in the frame. but when i try to compile the .java file i get following error: C:\Program Files\Java\JDK1.6.0_05\bin>javac HelloJava.java (the file is located in the bin map) HelloJava.java:5: cannot find symbol symbol : class JFrame
2
10607
by: zahit | last post by:
hi guys, my line doesn't appear on the frame. what's the problem? import java.util.*; import java.io.*; import javax.swing.JFrame; import javax.swing.JPanel; import java.awt.*; public class Operation {
6
13848
by: gaya3 | last post by:
Hi, I need to make the frame invisible on action event in swings. I have the following code: public class sample_pgm extends JFrame{ public void sample() { JFrame jf = new JFrame("Sample"); JPanel panel = new JPanel();
1
2547
by: Gimzo | last post by:
Hi, I'm trying to create a button that opens a new window for setting up a whole crapload of constants for an analysis program. For this, I have a JButton. The actionPerformed-method activates another method in the master class, which creates a new JFrame. The JFrame contains a JTable which has it's own TableModel, also residing within the master class. The JTable reads it's data from an array, which is updated or not depending on the...
1
6171
by: sibusiso | last post by:
HI Can anyone help with the scenario where where you have to pass a certain data from one JFrame to another. For example, suppose you have a JFrame is your main window you disabled your Jmenu and have an option of Login button and the login button calls another JDialog Class, say if Login() is true in Jdialog then enable JMenu on JFrame(Main window) exit the JDialog class. I am using NetBeans. Because I want to control the menu...
0
9453
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10099
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10036
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9904
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7451
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3607
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2849
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.