Commit 19a031d3 authored by 9831111's avatar 9831111 🙂

Add textAndLabel method.

parent 5f7eaf61
......@@ -66,8 +66,23 @@ public class SettingFrame extends JFrame {
add(userInformationPanel);
}
public void textAndLabel(String pngFile, String textField) {
ImageIcon icon = new ImageIcon(pngFile);
JLabel label = new JLabel(icon);
userInformationPanel.add(label);
JTextField text = new JTextField(textField);
text.setEditable(false);
text.setBackground(Color.darkGray);
text.setBorder(new LineBorder(Color.GRAY, 2));
text.setHorizontalAlignment(JTextField.CENTER);
text.setForeground(Color.WHITE);
userInformationPanel.add(text);
}
}
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