Jump to content

Serious problems on GUI with NetBeans.....

Featured Replies

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

  • Author

Has any one used NetBeans before??

 

Is my question that hard????

Archived

This topic is now archived and is closed to further replies.

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.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.