wordle/GUI.java

35 lines
725 B
Java

import java.awt.Graphics;
import javax.swing.JFrame;
import javax.swing.JPanel;
public class GUI extends JPanel {
private static final long serialVersionUID = 1L;
private JFrame frame;
private Letter[][] letters;
public GUI() {
frame = new JFrame();
frame.setSize(1000, 800);
frame.setTitle("Wordle");
frame.setVisible(true);
frame.setLocationRelativeTo(null);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.add(this);
letters = new Letter[5][6];
for (int x = 0; x < letters.length; x++) {
for (int y = 0; y < letters[0].length; y++) {
letters[x][y] = new Letter();
}
}
}
@Override
protected void paintComponent(Graphics g) {
g.drawRect(100, 100, 100, 100);
}
}