Hello,
Guys this is my part of the code. If I have made a mistake, then guide me with it.
Code:
private JButton getJButton() {
if (jButton == null) {
Icon ig = new ImageIcon("lion.jpg");
jButton = new JButton(ig);
jButton.setBounds(new Rectangle(29, 58, 94, 54));
jButton.setText("");
jButton.addActionListener(new java.awt.event.ActionListener() {
Public void actionPerformed(java.awt.event.ActionEvent e) {
/ / System.out.println (analyselex.lion) / / TODO Auto-generated Event stub actionPerformed ()
stack.push(1);
}
});
}
return jButton;
}
private JButton getJButton1() {
if (jButton1 == null) {
Icon = ig new ImageIcon("Leopard.jpg");
jButton1 = new JButton(ig);
jButton1.setBounds(new Rectangle(30, 3, 93, 50));
jButton1.setText("");
jButton1.addActionListener(new java.awt.event.ActionListener() {
Public void actionPerformed(java.awt.event.ActionEvent e) {
/ / System.out.println (elements.leopard) / / TODO Auto-generated Event stub actionPerformed ()
stack.push(2);
}
});
}
return jButton1;
}
Bookmarks