hi, how can i put click event to my java application if i'm using the gridbaglayout , how can i detect the button("C") was click from other button and execute the event, i'm a novice in java, thanks very much, here is my code:
button = new JButton("C");
if (shouldWeightX) {
c.weightx = 0.5;
}
c.gridwidth = 1;
c.gridx = 0;
c.gridy = 1;
pane.add(button, c);
button = new JButton("C");
if (shouldWeightX) {
c.weightx = 0.5;
}
c.gridwidth = 1;
c.gridx = 0;
c.gridy = 1;
pane.add(button, c);