Commit 7df8ba20 authored by 9831111's avatar 9831111 🙂

Add initInformationPanel method.

parent 999f0792
...@@ -30,11 +30,25 @@ public class LoginFrame extends JFrame { ...@@ -30,11 +30,25 @@ public class LoginFrame extends JFrame {
initLoginFrame(); initLoginFrame();
initRemindMe(); initRemindMe();
// initInformationPanel(); initInformationPanel();
setVisible(true); setVisible(true);
} }
public void initInformationPanel() {
informationPanel = new JPanel();
informationPanel.setOpaque(true);
informationPanel.setBorder(new LineBorder(Color.DARK_GRAY));
informationPanel.setLayout(new GridLayout(3, 1));
informationPanel.add(userName);
informationPanel.add(passwordField);
informationPanel.add(remindMe);
add(informationPanel, BorderLayout.CENTER);
}
public void initLoginFrame() { public void initLoginFrame() {
tankPhoto = new ImageIcon("gifFiles/gif.gif"); tankPhoto = new ImageIcon("gifFiles/gif.gif");
...@@ -66,6 +80,7 @@ public class LoginFrame extends JFrame { ...@@ -66,6 +80,7 @@ public class LoginFrame extends JFrame {
} }
public void initRemindMe() { public void initRemindMe() {
File accounts = new File("Accounts.txt"); File accounts = new File("Accounts.txt");
try (Scanner scanner = new Scanner(new FileReader(accounts))) { try (Scanner scanner = new Scanner(new FileReader(accounts))) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment