Disable « Development « Java Swing Q&A





1. Java: way to completely disable any Swing unwanted beeps?    stackoverflow.com

I am working on a fairly complex Java application using Swing. On some occasions there are unwanted beeps without any user intervention. No crash, application keeps working fine, I'm respecting the EDT ...

2. NetBeans clean and build makes disable components enabled    stackoverflow.com

I have few components(radioButtons and menuItem) with unchecked option enable in properties panel. Sometimes after clean and build these components are back enable. I use NetBeans 7.0.

3. Disabling auto-alignment in the GUI builder    forums.netbeans.org

hi...... if i used the null layout in the netbean builder, does it solve all the problem stated in this page :: http://www.leepoint.net/notes-java/GUI/layouts/nulllayout.html????? -- View this message in context: http://netbeans-org.1045718.n5.nabble.com/Disabling-auto-alignment-in-the-GUI-builder-tp2931572p4508957.html Sent from the Netbeans IDE Users mailing list archive at Nabble.com.

4. how to enable/disable this item?    coderanch.com

Hi Arun, You first need to move your JMenuBar out to a class variable in order to get a handle on it outside of your constructor. Once this is done, you can use the following snippets to get at the menu items: // // Assume here that [B]menubar[/B] is a class variable! // // // Enable File -> Disconnect button. // ...

5. Disabling Choice Auto-expansion    coderanch.com

Hi, I have this frame with a choice in it. it has an item that is a string with a length of 50 characters. When i lost focus to that panel and get back to it, the choice is expanding its length according to item's length. So when i have long string in it, it expand and shrinking other components besides ...

6. Disable resize option    coderanch.com

7. Disabled components    coderanch.com

8. How was this disabling done?    coderanch.com

I worked on an a Swing (1.2) GUI where the command buttons switched between 'enabled' and 'disabled' state independent of security issues. In the final stages of development, the buttons were hooked up to a home-grown security framework by inluding the statment: SecurityManager.protect (myJButton, "delete_employee"). No other changes were made to the existing button logic. Once the button was 'secured' by ...

9. How to disable a particular Jliste element?    coderanch.com

I'd say you've mentioned the better way of doing it, but this might be enough of a workaround import javax.swing.*; import java.awt.*; import javax.swing.event.*; class Testing extends JFrame implements ListSelectionListener { String[] cities = {"London","Madrid","New York","Rome","Sydney","Toronto","Washington"}; DefaultListModel listModel = new DefaultListModel(); JList list = new JList(listModel); public Testing() { setLocation(400,300); setDefaultCloseOperation(EXIT_ON_CLOSE); Container frame = getContentPane(); frame.setLayout(new FlowLayout(FlowLayout.CENTER)); for(int ...





10. how to disable resize    coderanch.com

11. How to disable components    coderanch.com

You need to hang on to a reference to the thread in question, and then call thread.interrupt(). You should only do this with threads you have created yourself, not with AWT threads that call your paint methods or event handlers. The article referenced in the javadocs for several Thread methods (e.g. Thread.sleep) talks about thread handling in the context of AWT ...

12. Enabling and disabling component is swing    coderanch.com

Hello, I am working on table and using combo box in one cell of table and on selection of item of combo box doing enable one another combo and label. That is all in itemStateChanged method. When I launched the dialog first time that is working fine but when I re launch that dialog and makes a selection component does not ...

14. Enabling and disabling of FieldEditors    coderanch.com

I have a doubt related usage FieldEditors in Plugin development. I have a preference page which basically consists of some StringFieldEditors, booleanFieldEditors, RadioGroupFieldEditors etc. The problem I'm facing is as follows: I have a booleanFiledEditor called "Full Details". The code for this is as follows: BooleanFieldEditor fullDetails = new BooleanFieldEditor("fullDetails", "Full Details", org.eclipse.swt.SWT.NONE, getFieldEditorParent()); addField(fullDetails); Once the user checks this boolean ...

15. Disable all components by getComponents    coderanch.com

I like to disable all components on the JPanel by calling getComponents. The following is my test program, but all components (e.g. JTextField) are not disabled. Please help. import java.awt.BorderLayout; import java.awt.Component; import java.awt.FlowLayout; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField; public class TextForm extends JPanel { private JTextField[] fields; // Create ...

16. Disabling whole view    coderanch.com