Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Layout(columns = "4dlu, default, 4dlu, 100dlu:grow, 4dlu", rows = "4dlu, default, 4dlu, default, 4dlu, default:grow, 4dlu")
- public class TestePanel extends CustomPanel {
- @Property(iconName = "users.png")
- @Location(text = "Nome:", col = 2, row = 2, alignment = Position.CENTER, position = Position.LEFT)
- private JLabel lblName;
- @Location(col = 4, row = 2, alignment = Position.FILL, position = Position.FILL)
- private JTextField txtName;
- @Property(iconName = "key.png")
- @Location(text = "Senha:", col = 2, row = 4, position = Position.LEFT)
- private JLabel lblPassword;
- @Location(col = 4, row = 4, position = Position.FILL, alignment = Position.FILL)
- private JTextField txtPass;
- @Location(col = 2, row = 6, colSpan = 4, alignment = Position.FILL, position = Position.FILL)
- private ButtonPanel btnPanel;
- public TestePanel() throws Exception {
- super();
- }
- public void setLblName(JLabel lblName) {
- this.lblName = lblName;
- }
- public void setTxtName(JTextField txtName) {
- this.txtName = txtName;
- }
- public void setLblPassword(JLabel lblPassword) {
- this.lblPassword = lblPassword;
- }
- public void setTxtPass(JTextField txtPass) {
- this.txtPass = txtPass;
- }
- public void setBtnPanel(ButtonPanel btnPanel) {
- this.btnPanel = btnPanel;
- }
- public static void main(String[] args) throws Exception {
- UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
- JFrame frame = new JFrame();
- frame.setTitle("Teste @Swingoodies");
- frame.setContentPane(new TestePanel());
- frame.pack();
- frame.setVisible(true);
- frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- frame.setLocationRelativeTo(null);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement