Java Error: Exception in thread “main” java.lang.IllegalArgumentException: adding a window to a container
问题 I am currently creating a Calculator project in java and right now I am only making the design or the GUI for it. This is my code: import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; public class Calculator extends JFrame { JButton jcomp1; JButton jcomp2; JButton jcomp3; JTextField jcomp4; JTextField jcomp5; JRadioButton rb1; JRadioButton jcomp7; JRadioButton jcomp8; JRadioButton jcomp9; JRadioButton jcomp10; JRadioButton jcomp11; JLabel jcomp12;