Jump to content

Serious problems on GUI with NetBeans.....


albertlee

Recommended Posts

package supershare;

 

import java.awt.event.*;

import javax.swing.*;

 

public class testGUI extends javax.swing.JFrame implements java.awt.event.ActionListener{

 

 

public testGUI(){initComponents();}

 

public void initComponents(){/*Generated Code*/}

 

public static void main(String args[]) {

 

new testGUI().setVisible(true);

 

}

public void actionPerformed(ActionEvent e)

{

/*JProgressBar jp = new JProgressBar(0' date=' 100);

jp.setValue(0);

jp.setStringPainted(true);

 

this.add(jp);

this.validate();*/

 

this.remove(jButton1);

this.validate();

this.repaint();

}

// Variables declaration - do not modify

private javax.swing.JButton jButton1;

// End of variables declaration

 

}

 

[/quote']

 

 

Above is the code I made under NetBeans....

 

As you know, NetBeans has a function called "JFrameForm", which allows you to design GUI more conviniently....

 

if you are familar with NetBeans, you can easily understand the above code...

 

You know what I am trying to do is that when I click the button, the button should disappear, but it doesnot....

 

please help here... actually, I have a bigger project meeting this problem.. and if I have to design the whole project without using NetBeans's JFrameForm function, it will be a nightmare...yes, lots of work...

 

 

Apreciate any help

 

thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.