-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdateideas.java
72 lines (63 loc) · 2.07 KB
/
dateideas.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import javax.swing.*;
import java.awt.event.*;
import java.awt.Font;
import java.awt.Color;
class dateideas implements ActionListener {
JFrame f = new JFrame("<3");
JTextField tf = new JTextField("");
JLabel l = new JLabel("cute date ideas ;)");
String s;
int x = 0;
dateideas() {
f.setSize(320, 180);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setResizable(false);
f.getContentPane().setBackground(Color.WHITE);
tf.setEditable(false);
tf.setBounds(10, 50, 280, 80);
tf.setBackground(Color.CYAN);
tf.setFont(new Font("Arial", Font.ITALIC, 12));
tf.setText("mhmm");
l.setBounds(10, 10, 140, 30);
l.setFont(new Font("Arial", Font.BOLD, 15));
JButton t = new JButton("change");
t.setBounds(200, 10, 90, 30);
t.addActionListener(this);
f.add(tf);
f.add(t);
f.add(l);
f.setLayout(null);
f.setVisible(true);
}
public void actionPerformed(ActionEvent e) {
if (e.getActionCommand().equals("change")) {
if (x == 0) {
x++;
tf.setText("go on a picnic to watch the sunset together :p");
}
else if (x == 1) {
x++;
tf.setText("go to a restaurant you never have been to before.");
}
else if (x == 2) {
x++;
tf.setText("roam around at night hand in hand :)))");
}
else if (x == 3) {
x++;
tf.setText("go arcade gaming. its fun.");
}
else if (x == 4) {
x++;
tf.setText("its always a date if the two are together and in love.");
}
else if (x == 5) {
x = 0;
tf.setText("lay in bed together and cuddle all night :)))");
}
}
}
public static void main(String[] args) {
new dateideas();
}
}