Skip to content

Commit 3b0f17f

Browse files
committed
Changed the layout of th UI
1 parent 722ac99 commit 3b0f17f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/main/java/UserSearchUI.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Provides the UI elements
33
*/
44
import javax.swing.*;
5-
import java.awt.GridLayout;
5+
import java.awt.*;
66
import java.awt.event.ActionEvent;
77
import java.awt.event.ActionListener;
88
import java.io.File;
@@ -15,7 +15,7 @@ public UserSearchUI() {
1515
final JFrame frame = new JFrame();
1616
frame.setSize(300, 100);
1717
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
18-
frame.setLayout(new GridLayout());
18+
frame.setLayout(new FlowLayout());
1919

2020
final JTextField field = new JTextField("Enter a username");
2121

@@ -50,10 +50,10 @@ public String showProfile(String username) {
5050
}
5151

5252
// for trying out the code:
53-
// public static void main(String[] args) {
54-
// new UserSearchUI();
55-
//
56-
// }
53+
public static void main(String[] args) {
54+
new UserSearchUI();
55+
56+
}
5757

5858
}
5959

0 commit comments

Comments
 (0)