How to close only one frame
Hi!
How do i close only one frame?
I know this close everything:
private void exitActionPerformed(java.awt.event.ActionEvent evt) {
Component panel = null;
System.exit(0);
But i tried this: but dos'nt work ....
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new configuration().setVisible(false);
}
r035198x wrote:
Enojado wrote:
Sorry, i tried this:
private void confexitActionPerformed(java.awt.event.ActionEvent evt) {
new NewJFrame().setVisible(false);
}Which frame are you hiding here? You are creating a new one and hiding it before it has a chance to say or show anything. That's incredibly rude.
P.S setVisible(false) just hides. dispose() throws the frame and its components into the trash bin.Yep, that was the answer. :] thanks
Similar Messages
-
hi,
I'm developing a java application which will involve a pop up text box (a JPanel). This has a JButton that when pressed will cause the pop up box to close but not the actual application. I've tried System.exit(0); but this causes the entire application to close.
Could someone tell me how to close the window but keep the application running.
CheersSwitch it to invisible, and dispose it.
-
I have just upgraded from Elements 7 to Elements 11 but find in the photo Collage there is only one frame, how do I get more, my old 7 had a good variety???
Hi Wobygong5,
I am afraid PSE11 has just one theme, ie. Basic.
However you can go to Expert mode, and then create a new image of the size you want, and then insert frames from the Graphics panel. You can insert as many frames as you want.
But Photo Collage will offer you just one theme.
-Rahul. -
When I want to close only one window it closes all of them. How do I close just one.
I only want to close one window. How can I do this without closing them all. But for this, I would use Mozilla all the time.
Thanks, JoyceYou do not mention what your Operating System is. You should be able to close only one firefox window, and then finally exit from firefox as a whole by using Firefox Button -> exit.
Also or alternatively consider use [[tabbed browsing]]. -
Hi, I want to open a frame when I run an application. The problem is that that frame is opened always that I run the application, so you can have several opened frames.
How can I make to open only one frame, and that no frame is opened until I close the first one?
thanksThis is with useing a button
first class
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class ball extends JFrame implements ActionListener{
ballball bebe = new ballball();
public ball() {
super("My button");
setSize(400,400);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Container pane = getContentPane();
FlowLayout flow = new FlowLayout();
pane.setLayout(flow);
pane.add(bebe.button);
bebe.button.addActionListener(this);
setContentPane(pane);
setVisible(true);
public void actionPerformed(ActionEvent me){
Object ob = me.getSource();
if(ob == bebe.button) {
bebe.Myothergui();
bebe.button.setEnabled(false);
public static void main(String[] args) {
ball ba = new ball();
Second class
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class ballball {
JFrame frame;
JButton button = new JButton("my butto");
public void Myothergui() {
frame = new JFrame();
frame.setSize(300,300);
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
button.setEnabled(true);
frame.setVisible(false);
frame.setVisible(true);
GOOD LUCK and learn to use the http://java.sun.com/j2se/1.4/docs/api/ most of your ? can be answered there.Anyways have a good one and STUDY STUDY STUDY -
How to backup only one tablespace in cold backup noarchivelog mode
Hi,
How to backup only one tablespace in cold backup noarchivelog mode
Reagrds,
RushangWe have to restore all 50 GB database if we fail in scripts meanwhile to start again the data load.
Out scripts populater only two tablespaces.
That's why if i take backup of those tabblespace then i have to restore only those tablespace not whole database.
Regards,
Rushang -
Took a video rather than still pic by mistake. How do I print one frame?
Took a video by mistake instead of a single pic. How do I print one frame?
There are apps such as Video 2 Photo (I haven't tried it) that apparently allow you to extract frames from a video
-
How to deploy only one project from WebCenterSpacesExtensions to WebCenter
Hello,
I've been provided a customized WebCenterSpacesExtensions application with 3 custom task flow projects in it.
I am having trouble finding information on how to deploy only one project at a time. Can someone please tell me how to do this? Is it difficult?
Thanks in advance.Take a look at chapter 53 in webcenter developer's guide which explains the same:
http://docs.oracle.com/cd/E25054_01/webcenter.1111/e10148/jpsdg_wcsres.htm#BABDBECE
Thanks,
Navaneeth -
How to boot only one group in remote machine from master machine
Hi,
I want to know the command to boot entire remote machine from master machine and how to boot only one group for remote machine from master machine.
Thanks
AmitYou can boot the entire remote machine (after booting the Master machine) as follows:
tmboot -B <lmid of remote machine> -l <lmid of remote machine>.
For all the available tmboot options see http://download.oracle.com/docs/cd/E18050_01/tuxedo/docs11gr1/rfcm/rfcmd.html#wp1032112
Regards,
Malcolm. -
HOW TO TRANSFER ONLY ONE APPLICATION FROM AN OLD MACHINE TO A NEW ONE
HOW TO TRANSFER ONLY ONE APPLICATION FROM AN OLD MACBOOK TO A MACBOOK PRO ?
THERE IS AN EASY WAY TO TRANSFER SONGS & PHOTOS
BETWEEN IPOD & IPHONE
SIMPLY USE TRANSPOD APPLICATION ON BOTH DEVICES
THEN
DO IT
(U HAVE TO BE ON THE SAME NETWORK) -
How do you close only one window (not tab) when you have two open?
I can close a tab when I have multiple ones open but if I have two windows open and I close one window it closes all other windows. How can I close just one window without shutting down any other windows?
Yes, when I click on the red X it closes both windows. I'll try the Ctrl+w
Thanks -
When two screens are open, how do I close only one screen?
When the site opens screen A sometimes has user open screen B. When user finishes screen B and desires to return to screen A, the x in the upper right corner is chosen, a message appears you are about to close 2 screens however user only wants screen B to close. I cannot find a way to close only screen B. How do I close only screen B?
Hi:
When you talk about ''screen A and screen B'', are you referring to tabs on the top of your screen in Firefox? Because to close those, you:
# click on the tab
# while in the tab, go to the top of it at the top of your screen
# hover over it
# you shoould now see an "x" at the rightmost side of the tab. Now click on that to only close that tab.
Were you referring to that? Thanks for your patience! -
How to make only one JFrame active at a time !!!
Hy, I have created a JFrame and I have placed a
JPanel in it. I also have a JButton "New" on the
JPanel. When I click on the "New" Button, another JFrame
appears. But I want ONLY one JFrame to be appeared
at a time. That is when a JFrame appears on the JPanel,
I should not be able to add another one.
If it is not possible to do this with JFrame, then how to do
it with a JDialog
How to do this.
thanksYou can declare a boolean variable in your class and set it to true if you open a window. Next time when you click the NEW button, check whether that boolean value is true or false. If true then don't open a new window. Also when u close the frame window, set the boolean value to false.
-
How to open only one clip at a time in the source monitor?
Ok the answer to this question may be simple.. hopefully...
At the moment each time I open a clip in the source monitor it adds it to the dropdown list.
Fine... but I am opening and closing hundreds of clips in a day and after a while I noticed it seemed to be slowing down the whole PPCS5.5 system.
It appears that PP seems to be keeping each clip I open... active.
Is there a way to allow only one clip to be open at a time in the source monitor... other than having to close them all first??? (would be ideal if there was some kind of shortcut like shift-doubleclick)SonyZ7's can record to compact flash cards as well as tape, so I generally log and transfer from the cards.
So I guess I should do a bit more research on workflow's in Pr
No probs, here's a bunch of MediaInfo...
General
Complete name : /Volumes/Rugged 1TB/Business/WAPLES 10.October/Check It 2011 Event/Check It 2011 event footage/001 CheckIt2011.mov
Format : MPEG-4
Format profile : QuickTime
Codec ID : qt
File size : 195 MiB
Duration : 1mn 0s
Overall bit rate : 26.9 Mbps
Encoded date : UTC 2011-09-08 21:37:37
Tagged date : UTC 2011-10-28 11:50:04
Writing library : Apple QuickTime
Original source medium : Check It event CF2
©TSC : 2500
©TSZ : 100
Video
ID : 1
Format : DV
Codec ID : hdv3
Duration : 1mn 0s
Bit rate : 25.0 Mbps
Width : 1 416 pixels
Original width : 1 440 pixels
Height : 1 062 pixels
Original height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:2
Scan type : Interlaced
Scan order : Top Field First
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.665
Stream size : 181 MiB (93%)
Language : English
Encoded date : UTC 2011-09-08 21:37:37
Tagged date : UTC 2011-09-08 21:37:37
Material_Duration : 61560
Material_StreamSize : 192330610
Material_FrameCount : 1539
Audio #1
ID : 2
Format : PCM
Format settings, Endianness : Little
Format settings, Sign : Signed
Codec ID : sowt
Duration : 1mn 0s
Bit rate mode : Constant
Bit rate : 768 Kbps
Channel(s) : 1 channel
Channel positions : Front: L
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Stream size : 5.57 MiB (3%)
Language : English
Encoded date : UTC 2011-09-08 21:37:37
Tagged date : UTC 2011-09-08 21:37:37
Material_Duration : 61560
Material_StreamSize : 5909760
Audio #2
ID : 3
Format : PCM
Format settings, Endianness : Little
Format settings, Sign : Signed
Codec ID : sowt
Duration : 1mn 0s
Bit rate mode : Constant
Bit rate : 768 Kbps
Channel(s) : 1 channel
Channel positions : Front: R
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Stream size : 5.57 MiB (3%)
Language : English
Encoded date : UTC 2011-09-08 21:37:37
Tagged date : UTC 2011-09-08 21:37:37
Material_Duration : 61560
Material_StreamSize : 5909760
Menu
ID : 4
Language : English
Encoded date : UTC 2011-09-08 21:37:37
Tagged date : UTC 2011-09-08 21:37:37 -
How to open only one web page at a time?
I used to have it set so when I opened a new web page, the previous one closed. Now, nothing closes automatically and I have about 50 pages open that I have to close. How do I set it so that only one page opens at a time?
HI Janice,
You can use a keyboard shortcut to close all windows in Safari. CommandShiftW.
To close one window, Command + W.
Carolyn
Maybe you are looking for
-
Hi, I want to downgrade from OSX LEOPARD to OSX TIGER but I have a few questions regarding this. My iMac is originally from Sep 2007 it came preloaded with tiger. I have original install (2) tiger discs version 10.4.10. I want to know if it is safe
-
Environment: Win XP After renaming the hostname, while re-starting the EM, I am getting the following error. "Enterprise Manager is not able to connect to the database instance. The state of the components are listed below. See below, EM Login Page.
-
Button Toggle ADF Javascript(Works in Firefox but not in IE. why ?)
I have written a code to toggle button in ADF as follows: <af:resource type="javascript"> function enableDisable(actionEvent){ alert("21"); document.getElementById('cb1').style.background='red'; document.getElementById('cb2').style.background='green'
-
BADi migrated to enhancement SPOT.
Hi All, I am working on BADI 'ME_PROCESS_PO_CUST'.When i am implementing this BADI.It is giving the information message like BADI migrated to Enhancement spot. Is it possiable to implement this BADI.I want to check the condition in the item level. Ca
-
Xp clients can't change password
Last week I upgraded from leopard to snow leopard server. All has gone well with xp clients joining the domain, logging in with roaming profiles. Today I found that the change password does not work (this is the first try for this - it worked on leop