Dear Vadim Vera, please run the below example, please write to me if you have any issues
if i am not wrong, i think this is what you wanted for. regards PH import java.awt.BorderLayout; import java.awt.FlowLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.WindowConstants; public class CheckTest extends JFrame implements ActionListener { JButton but = new JButton("Dont Click Me"); JCheckBox box = new JCheckBox("Check Me"); public CheckTest() { this.setSize(50, 30); this.setTitle("Check Test"); this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); JPanel panel = new JPanel(); panel.setLayout(new FlowLayout(FlowLayout.CENTER)); box.addActionListener(this); panel.add(box); panel.add(but); this.getContentPane().setLayout(new BorderLayout()); this.getContentPane().add(panel); } /** * @param args */ public static void main(String[] args) { CheckTest test = new CheckTest(); test.pack(); test.show(); } public void actionPerformed(ActionEvent e) { if (but.isVisible()) but.setVisible(false); else but.setVisible(true); } } Vadim Vera <[EMAIL PROTECTED]> wrote: I've googling for this with no hope, the example of what i want to do is like this: I'm using Oracle JDeveloper 10g, on the IDE when you try to refactoring any item of the code, the dialog is a very well common circumbstance of what I'm saying...by the way if you could send me the working copy of this I would very grateful...(sorry for my english, so I speak español, de Cuba)... ----- Original Message ----- From: "purushóttam krishna hegde" To: Sent: Saturday, June 17, 2006 4:36 a.m. Subject: Re: SWING question... > Dear Vadim, > You need to add a listened to checkbox annd in the listened > you have API support for kwing whether the ckeck box is selected or not. > Depeding on the state of check box, you can dissable or enable a button. > If u want a working copy of this , as soon as i reach office on monday, i will send one for you > > Cheers > ph =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant archives, FAQs and Forums on JSPs can be found at: http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant archives, FAQs and Forums on JSPs can be found at: http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com