Files
oop/lab/lab10/Question2/Start.java
2022-05-01 23:24:00 +08:00

21 lines
422 B
Java

/**
* Answer to question.
*
* -Q: Instead of adding to the frame two different buttons, add twice the same
* button object. Run the program. What happens?
*
* -A: Only one button is added to the frame.
*
*/
public class Start {
public static void main(String[] args) {
// Dispather
javax.swing.SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
new MyFrame();
}
});
}
}