Disable « JFrame « Java Swing Q&A





1. How to disable main JFrame when open new JFrame    stackoverflow.com

Example now I have a main frame contains jtable display all the customer information, and there was a create button to open up a new JFrame that allow user to create ...

2. How to disable almost all components in a JFrame?    stackoverflow.com

When I start some processing, I want to disable the JButtons, JText, Lists, etc. in the GUI, only having one button to stop the processing. What is a clean way to do ...

3. Why do I get a NullPointerException when trying to disable a JFrame?    stackoverflow.com

I get a run-time error NullPointerException whenever I try to click the options button on my JFrame. The JFrame is CharSelection(), and I want to disable it so that I ...

4. Enable/Disable Window Close X    coderanch.com

Hi Emerson, No you can't visually enable or disable it. As stated by Karthik, you can use the callback. You will never want to remove it though because the default action is to remove the window. Since you want to use some logic on when to remove the window your listener will always be required! The code below illustrates the feature. ...

6. How to disable the [ - ] resizing of a frame    coderanch.com

I generally do not think locking the size is a good idea. Unless it is a small dialog. You are making the assumption that all users use the same size monitor and have the resolution set the same. Learning the layout managers goes along way in making the GUI presentable with all resolutions and resizing. The next step that many take ...

7. disabling JFrame resize    coderanch.com

8. Disable JFrame    coderanch.com

Hi. I am having a problem figuring out how to disable a JFrame. It's kind of tricky. We have an application we created strictly for shop floor data collection. This application is going to be running on a PC on our shop floor. We do not want the employees to be able to close out of this application, or even minimize ...

9. Disable JFrame's components    coderanch.com





10. disabling mouse effects on swing forms    coderanch.com

I want to disable mouse on swing forms. Probably you will recommend "If you dont want to process mouse events then dont add any of MouseListeners." I am not asking that.My problem is about focusing.Only with keyboard i want to manage the focusing... Mouse must be useless focusing in UIs.Because wherever i click with mouse swing components ,cursor is jumping to ...

11. To disable the frame .........................    coderanch.com

i'm facing a problem with the custom dialogbox. There is an inbuilt method in JOptionPane, but this is a custom Dialog. I have a frame with menu and it has a menuitem. when i click the menuitem , it opens a custom dialogbox with 2 panels. After the dialog is opened, i'm still able to access the Frame. I don't want ...

12. Disable JFrame Control    coderanch.com

13. how to disable the top bar in a Frame    coderanch.com

> but i want to disable the whole thing disable? = get rid of? a couple of options: import javax.swing.*; import java.awt.*; import java.awt.event.*; class Testing { public void buildGUI() { JDesktopPane desktop = new JDesktopPane(); JInternalFrame jif1 = new JInternalFrame("#1",true,true,true,true); jif1.putClientProperty("JInternalFrame.isPalette", Boolean.TRUE); jif1.setBounds(50,50,150,100); jif1.setVisible(true); desktop.add(jif1); JInternalFrame jif2 = new JInternalFrame("#2",true,true,true,true); ((javax.swing.plaf.metal.MetalInternalFrameUI) jif2.getUI()).setNorthPane(null); jif2.setBounds(250,50,150,100); jif2.setVisible(true); desktop.add(jif2); JFrame f = new JFrame(); ...

14. disable only vertical resize of JFrame    coderanch.com

15. how to disable parent jframe when child jframe is active    coderanch.com

Hi... Please anyone tell me as how to disable parent frame or window when child frame is active. when i click on a jbutton on one frame, a new frame will open. while this new frame is open i want to disable the first frame. like disabling any mouse click on first window. and when i close new frame then i ...

16. disabling JFrame's response to spacebar    java-forums.org

How can I get a JFrame to stop responding to the spacebar? I'm programming a video game and I want to use the spacebar for firing. I'm using key binding for all responses to key strokes. I just added the spacebar to my bindKeys() method and it didn't respond the same way the other keys did. I soon realized the reason ...





17. Disable repositioning of JFrame    java-forums.org

well, i'll tell u my idea in brief: i actually wanted a window with a transparent frame. I thought ill do that the way picassa does it, u know, when it's in full-screen mode, it just captures a pic of the desktop, and pastes it as a background. but when u minimise it, it just shows a grey background, because if ...

18. disabling and re-enabling a jframe    java-forums.org

This button simply sets enabled, does something else and then sets enabled back. So if it's enabled initially it will disable and re enable it in a very short amount of time(nanoseconds most likely), you should probably have a button to disable it and one to enable it, or use a timer to put a pause in.

19. disable parent window    java-forums.org

20. Disable resize/maximise in a GUI window    forums.oracle.com