在我点击其中一个编号按钮之前,我只是想让文本字段不可见.忽略我糟糕的间距和缺乏评论,因为这是一个早期的粗略草案.文本字段名为inputField1,我希望当我单击标记为1的按钮时将其设置为Visible.谢谢
import java.lang.String.*;
import java.lang.Exception.*;
import java.util.EventObject;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Airplanes extends JFrame implements ActionListener {
private static final int FRAME_WIDTH = 330;
private static final int FRAME_HEIGHT = 300;
private static final int FRAME_X_ORIGIN = 150;
private static final int FRAME_Y_ORIGIN = 300;
private static final int BUTTON_WIDTH = 50;
private static final int BUTTON_HEIGHT = 30;
private JTextField inputLine1;
private JButton oneButton;
private JButton twoButton;
private JButton threeButton;
private JButton fourButton;
private JButton …Run Code Online (Sandbox Code Playgroud)