Problem with JmenuItems Cannot setvisible true
Hi
I am coding an application using java and i have a menu item which i want to lead to a different form.i.e. when i click jMenuItem1 i should go to RegistrationUIMenu1. But the code i used does not work i don't understand. please help me
Here is the code i used:
Code :
private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {
RegistrationUIMenu1.r1=new RegistrationUIMenu1;
r1.setVisible(true);
}
I use net beans7.2 for my coding
when i tyype the cod eit says that the variable is not found?????
i dont understand please help me
Re: Problem with JmenuItems Cannot setvisible true
Without the code or error messages....
If something is not found, that means you have not defined what ever was not found. Like saying
i = 3;
without saying
int i;
Re: Problem with JmenuItems Cannot setvisible true
so if i declared the variable, it would work?
Re: Problem with JmenuItems Cannot setvisible true
Quote:
HI,
I want to insert data into a database i have made using jtextfields. i.e. When i type my name into the jtextfield1 and press jbutton1 (ok), the dtabase should get updated. How do i do this?
Seems like you don't fully understand buttons and events. I would highly suggest you read up on some tutorials and documentation then create another (hopefully valid) attempt. After you understand your program you can move on to saving/loading data. You also want to look into why you are using mysql? Why not flat files? (Binary, txt, cfg, etc etc)