I have an app and when you run it you take a panel in order to add 3 values and after you need press the OK button in order to continue.
I put a Click() method but when i push OK nothing happen.
Also to mention when i am deluging is working but when i export it as executable jar is not.
JFrame frame = new JFrame();
JLabel mlabel = new JLabel("Please provide xxxx",JLabel.CENTER);
JLabel uLabel = new JLabel("User ID:",JLabel.LEFT);
JPanel buttonField = new JPanel(new GridLayout (1,3));
JPanel userArea = new JPanel(new GridLayout (0,3));
frame.setLayout(new GridLayout (0,1));
buttonField.setLayout(new FlowLayout());
JButton confirm =new JButton("OK");
confirm.addMouseListener((MouseListener) new mouseClick());
buttonField.add(confirm);
App.insertText = new JTextField(20);
frame.add(mlabel);
userArea.add(uLabel);
userArea.add(insertText);
frame.add(buttonField);
frame.setSize(300,600);
App.credGet = false;
frame.setVisible(true);
and the Click :
public void mouseClicked(MouseEvent e) {
App.un = App.insertText.getText();
App.project = ((JTextComponent) App.insertProject).getText();
//App.pw = char[] App.insertPass.getPassword();
char[] input = App.insertPass.getPassword();
App.pw = "";
for (int i1 = 0; i1 < input.length; i1++){
App.pw = App.pw + input[i1];
}
}
public void mouseEntered(MouseEvent arg0) {
// TODO Auto-generated method stub
}
public void mouseExited(MouseEvent arg0) {
// TODO Auto-generated method stub
}
public void mousePressed(MouseEvent arg0) {
// TODO Auto-generated method stub