import javax.swing.*;
import java.awt.Color;
import java.awt.Container;
import java.awt.GridLayout;
public class Main extends JFrame {
public Main() {
setTitle("The Real 2024 AP Rizz Test (LEAKED!!) (REAL!!!) (SUPER HARD!!!)");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
GridLayout grid = new GridLayout(4,2);
grid.setVgap(5);
// made a 4*2 grid layout, 5 pixels vertical gap
// or I could do:
// GridLayout grid = new GridLayout(4, 2, 30, 5)
// for a 4*2 grid layout, 10 pixels horizontal gap, 5 pixels vertical gap
Container c = getContentPane();
// created a Container object c
c.setLayout(grid);
// sets grid (our grid layout) as the content pane (= container) layout manager
c.add(new JLabel("Name fanum tax"));
c.add(new JTextField(""));
c.add(new JLabel("Type yes to confirm and get arthritis and +5000 aura"));
c.add(new JTextField(""));
c.add(new JLabel("Is ur hairline fire"));
c.add(new JTextField(""));
JLabel skibidi = new JLabel("Ready for the diddy party?");
skibidi.setForeground(Color.magenta);
c.add(skibidi);
c.add(new JTextField(""));
c.setBackground(Color.lightGray);
setSize(1000, 200);
setVisible(true);
}
public static void main(String[] args) {
new Main();
}
}
top of page
기능을 테스트하려면 라이브 사이트로 이동하세요.
GUI 2: simple grid layout and text field
GUI 2: simple grid layout and text field
댓글 0개
좋아요
댓글(0)
bottom of page