Package org.netbeans.lib.awtextra

Examples of org.netbeans.lib.awtextra.AbsoluteConstraints


                            jp2.add(jl,BorderLayout.EAST);
                            break;
                    }

                    jp.add(jp2);
                    jPanelContenedor.add(jp,new AbsoluteConstraints(0,posY));
                    posY += incremento;
                }
            } // fin del for
        } catch(Exception e)
        {
View Full Code Here


        setLayout(new AbsoluteLayout());

        final JLabel loginLabel = new JLabel();
        loginLabel.setHorizontalAlignment(SwingConstants.CENTER);
        loginLabel.setText("Логин");
        add(loginLabel, new AbsoluteConstraints(50, 20, 245, -1));

        loginTextField = new JTextField();
        loginTextField.setHorizontalAlignment(JTextField.CENTER);
        add(loginTextField, new AbsoluteConstraints(50, 40, 245, -1));

        final JLabel passwordLabel = new JLabel();
        passwordLabel.setHorizontalAlignment(SwingConstants.CENTER);
        passwordLabel.setText("Пароль");
        add(passwordLabel, new AbsoluteConstraints(50, 71, 245, -1));

        passwordTextField = new JPasswordField();
        passwordTextField.setHorizontalAlignment(JTextField.CENTER);
        add(passwordTextField, new AbsoluteConstraints(50, 91, 245, -1));

        loginButton = new JButton();
        loginButton.setText("Войти");
        loginButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent evt) {
                if (state == STATE_LOGIN) {
                    checkAuth();
                }
            }
        });
        add(loginButton, new AbsoluteConstraints(112, 129, 125, -1));

        signupButton = new JButton();
        signupButton.setText("Регистрация");
        signupButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent evt) {
                if (state == STATE_LOGIN) {
                    // Показываем форму регистрации
                    confirmPasswordTextField.setVisible(true);
                    loginButton.setVisible(false);
                    parentFrame.setTitle("Регистрация в системе");
                    state = STATE_SIGNUP;
                } else {
                    // Завершаем регистрацию и переходим в режим авторизации
                    if (!checkSignUpCredentials()) {
                        return;
                    }
                    backToAuth();
                }
            }
        });
        add(signupButton, new AbsoluteConstraints(112, 158, 125, -1));

        cancelButton = new JButton();
        cancelButton.setText("Отмена");
        cancelButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent evt) {
                if (state == STATE_SIGNUP) {
                    // Отменяем регистрацию
                    backToAuth();
                } else {
                    // Закрываем окно
                    parentFrame.setVisible(false);
                }
            }
        });
        add(cancelButton, new AbsoluteConstraints(112, 187, 125, -1));

        confirmPasswordTextField = new JPasswordField();
        confirmPasswordTextField.setHorizontalAlignment(JTextField.CENTER);
        add(confirmPasswordTextField, new AbsoluteConstraints(50, 120, 245, -1));
        confirmPasswordTextField.setVisible(false);
    }
View Full Code Here

        backButton.addActionListener(new ActionListener() {
            public void actionPerformed(final ActionEvent evt) {
                onBackClicked(evt);
            }
        });
        add(backButton, new AbsoluteConstraints(10, 10, 20, 20));

        monthAndYear.setFont(largeFont);
        monthAndYear.setHorizontalAlignment(JTextField.CENTER);
        monthAndYear.setText(formatDateText(selectedDate.getTime()));
        add(monthAndYear, new AbsoluteConstraints(30, 10, 100, 20));

        forwardButton.setFont(smallFont);
        forwardButton.setText(">");
        forwardButton.setMargin(insets);
        forwardButton.setDefaultCapable(false);
        forwardButton.addActionListener(new ActionListener() {
            public void actionPerformed(final ActionEvent evt) {
                onForwardClicked(evt);
            }
        });
        add(forwardButton, new AbsoluteConstraints(130, 10, 20, 20));

        // layout the column headings for the days of the week
        int x = startX;
        for (int ii = 0; ii < dayHeadings.length; ii++) {
            dayHeadings[ii].setBackground(gray);
            dayHeadings[ii].setEditable(false);
            dayHeadings[ii].setFont(smallFont);
            dayHeadings[ii].setHorizontalAlignment(JTextField.CENTER);
            dayHeadings[ii].setFocusable(false);
            add(dayHeadings[ii], new AbsoluteConstraints(x, 40, 21, 21));
            x += 20;
        }

        // layout the days of the month
        x = startX;
        int y = startY;
        for (int ii = 0; ii < daysInMonth.length; ii++) {
            for (int jj = 0; jj < daysInMonth[ii].length; jj++) {
                daysInMonth[ii][jj].setBackground(gray);
                daysInMonth[ii][jj].setEditable(false);
                daysInMonth[ii][jj].setFont(smallFont);
                daysInMonth[ii][jj].setHorizontalAlignment(JTextField.RIGHT);
                daysInMonth[ii][jj].setText("");
                daysInMonth[ii][jj].setFocusable(false);
                daysInMonth[ii][jj].addMouseListener(new MouseAdapter() {
                    public void mouseClicked(final MouseEvent evt) {
                        onDayClicked(evt);
                    }
                });
                add(daysInMonth[ii][jj], new AbsoluteConstraints(x, y, 21, 21));
                x += 20;
            }
            x = startX;
            y += 20;
        }
View Full Code Here

            this.remove(todayButton);
            this.remove(cancelButton);
        }

        if (hideOnSelect) {
            add(todayButton, new AbsoluteConstraints(25, 190, 52, -1));
            add(cancelButton, new AbsoluteConstraints(87, 190, 52, -1));
        } else {
            add(todayButton, new AbsoluteConstraints(55, 190, 52, -1));
        }
    }
View Full Code Here

        setLayout(new AbsoluteLayout());

        dateText.setText("");
        dateText.setEditable(false);
        dateText.setBackground(new Color(255, 255, 255));
        add(dateText, new AbsoluteConstraints(10, 10, 141, 20));

        dropdownButton.setText("...");
        dropdownButton.setMargin(new Insets(2, 2, 2, 2));
        dropdownButton.addActionListener(new ActionListener() {
            public void actionPerformed(final ActionEvent evt) {
                onButtonClick(evt);
            }
        });
        add(dropdownButton, new AbsoluteConstraints(151, 10, 20, 21));
    }
View Full Code Here

            tiempo.setText(player.getTiempo().toString());
            panel.add(name);
            panel.add(puntos);
            panel.add(tiempo);
        }
        superior.add(panel,new AbsoluteConstraints(10, 15, -1, -1));       
        return superior;      
    }
View Full Code Here

        for (int i = 0; i < 9; i++) {
            for (int j = 0; j < 9; j++) {
                tablero.add(matriz[i][j]);
            }           
        }
        superior.add(tablero,new AbsoluteConstraints(10, 10, -1, -1));       
        return superior;
    }
View Full Code Here

     */
    private void setupMainContainer(Container container){
        /*Panel izquierdo*/
        JPanel tmp = new JPanel();       
        tmp.setLayout(new AbsoluteLayout());
        tmp.add(informacion(),new AbsoluteConstraints(10, 10, -1, -1));
        tmp.add(jugador(),new AbsoluteConstraints(10, 95, -1, -1));
        tmp.add(dificultad(),new AbsoluteConstraints(10, 150, -1, -1));
        tmp.add(botones(),new AbsoluteConstraints(50, 245, -1, -1));
       
        container.setLayout(new BorderLayout());
        container.add(tmp,BorderLayout.LINE_END);       
        container.add(tablero(),BorderLayout.CENTER);
    }
View Full Code Here

        for (int i = 0; i < 9; i++) {
            for (int j = 0; j < 9; j++) {
                tablero.add(matriz[i][j]);
            }           
        }
        superior.add(tablero,new AbsoluteConstraints(10, 10, -1, -1));       
        return superior;
    }
View Full Code Here

TOP

Related Classes of org.netbeans.lib.awtextra.AbsoluteConstraints

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.