Refine search
public void createOptions() { options = new JPanel(); options.setLayout(null); JLabel labelOptions = new JLabel("Change Company Name:"); labelOptions.setBounds(120, 10, 150, 20); options.add(labelOptions); newTitle = new JTextField("Some Title"); newTitle.setBounds(80, 40, 225, 20); options.add(newTitle); // myTitle = new JTextField("My Title..."); // myTitle.setBounds(80, 40, 225, 20); // myTitle.add(labelOptions); JButton newName = new JButton("Set New Name"); newName.setBounds(60, 80, 150, 20); newName.addActionListener(this); options.add(newName); JButton Exit = new JButton("Exit"); Exit.setBounds(250, 80, 80, 20); Exit.addActionListener(this); options.add(Exit); }
private void addRow(String label, JComponent component) { JLabel l = new JLabel(label); l.setFont(Theme.SMALL_BOLD_FONT); l.setBounds(18, y, 400, 18); add(l); y += 18; int componentHeight = (int) component.getPreferredSize().getHeight(); component.setBounds(16, y, 400, componentHeight); y += componentHeight; y += 2; // vertical gap add(component); }
private void addRow(String label, JComponent component) { JLabel l = new JLabel(label); l.setFont(Theme.SMALL_BOLD_FONT); l.setBounds(18, y, 400, 18); add(l); y += 18; int componentHeight = (int) component.getPreferredSize().getHeight(); component.setBounds(16, y, 400, componentHeight); y += componentHeight; y += 2; // vertical gap add(component); }
public ProgressDialog(Frame owner, String title) { super(owner, title, false); getRootPane().putClientProperty("Window.style", "small"); setResizable(false); setLayout(null); Container contentPane = getContentPane(); contentPane.setLayout(null); tasksCompleted = 0; this.taskCount = 0; progressBar = new JProgressBar(JProgressBar.HORIZONTAL, 0, taskCount); progressBar.setIndeterminate(true); progressBar.setBounds(10, 10, 300, 32); contentPane.add(progressBar); progressLabel = new JLabel(); progressLabel.setBounds(320, 10, 50, 32); progressLabel.setVisible(false); contentPane.add(progressLabel); messageLabel = new JLabel(); messageLabel.setBounds(10, 40, 380, 32); contentPane.add(messageLabel); updateProgress(); setSize(400, 100); setLocationRelativeTo(owner); }
tabResult = new javax.swing.JLayeredPane(); pnlText = new javax.swing.JLayeredPane(); lblGameInfo = new javax.swing.JLabel(); lblMatchInfo = new javax.swing.JLabel(); lblAdditionalInfo = new javax.swing.JLabel(); lblResultImage = new javax.swing.JLabel(); tabStatistics = new javax.swing.JPanel(); lblGameInfo.setText("gameInfo"); pnlText.add(lblGameInfo); lblGameInfo.setBounds(11, 1, 550, 25); lblMatchInfo.setText("matchInfo"); pnlText.add(lblMatchInfo); lblMatchInfo.setBounds(10, 30, 550, 25); lblAdditionalInfo.setText("additionalInfo"); pnlText.add(lblAdditionalInfo); lblAdditionalInfo.setBounds(10, 60, 550, 25); lblResultImage.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); tabResult.add(lblResultImage); lblResultImage.setBounds(0, 0, 610, 250);
private void addCard(CardView card, BigCard bigCard, UUID gameId, Rectangle rectangle) { if (cardDimension == null) { cardDimension = new Dimension(Config.dimensions.frameWidth, Config.dimensions.frameHeight); } final MageCard cardImg = Plugins.instance.getMageCard(card, bigCard, cardDimension, gameId, true, true); cardImg.setBounds(rectangle); jLayeredPane.add(cardImg, JLayeredPane.DEFAULT_LAYER, 10); cardImg.update(card); cardImg.setCardBounds(rectangle.x, rectangle.y, cardDimensions.frameWidth, cardDimensions.frameHeight); cardImg.setCardCaptionTopOffset(8); // card caption below real card caption to see full name even with mana icons // card number label JLabel cardNumber = new JLabel(); int dy = -5; // image panel have empty space in bottom (bug?), need to move label up cardNumber.setBounds(rectangle.x, rectangle.y + cardImg.getHeight() + dy, cardDimensions.frameWidth, 20); cardNumber.setHorizontalAlignment(SwingConstants.CENTER); //cardNumber.setBorder(BorderFactory.createLineBorder(new Color(180, 50, 150), 3, true)); cardNumber.setFont(jLayeredPane.getFont().deriveFont(jLayeredPane.getFont().getStyle() | Font.BOLD)); cardNumber.setText(card.getCardNumber()); jLayeredPane.add(cardNumber); }
public static JXPanel getDescription(CardView card, int width, int height) { JXPanel descriptionPanel = new JXPanel(); //descriptionPanel.setAlpha(.8f); descriptionPanel.setBounds(0, 0, width, height); descriptionPanel.setVisible(false); descriptionPanel.setLayout(null); //descriptionPanel.setBorder(BorderFactory.createLineBorder(Color.green)); JButton j = new JButton(""); j.setBounds(0, 0, width, height); j.setBackground(Color.black); j.setLayout(null); JLabel cardText = new JLabel(); cardText.setBounds(5, 5, width - 10, height - 10); cardText.setForeground(Color.white); cardText.setFont(cardNameFont); cardText.setVerticalAlignment(SwingConstants.TOP); j.add(cardText); TextLines textLines = GuiDisplayUtil.getTextLinesfromCardView(card); cardText.setText(getRulefromCardView(card, textLines).toString()); descriptionPanel.add(j); return descriptionPanel; }
draftLeftPane = new javax.swing.JPanel(); btnQuitTournament = new javax.swing.JButton(); lblPack1 = new javax.swing.JLabel(); txtPack1 = new javax.swing.JTextField(); chkPack1 = new javax.swing.JCheckBox(); lblPack2 = new javax.swing.JLabel(); txtPack2 = new javax.swing.JTextField(); chkPack2 = new javax.swing.JCheckBox(); lblPack3 = new javax.swing.JLabel(); txtPack3 = new javax.swing.JTextField(); chkPack3 = new javax.swing.JCheckBox(); lblTableImage.setVerifyInputWhenFocusTarget(false); jPanel1.add(lblTableImage); lblTableImage.setBounds(95, 5, 40, 136);
private JTextField cretateTextField(JPanel section,String name, int y_pos) { JLabel label = new JLabel(name); label.setBounds(10, y_pos, 174, 14); section.add(label); JTextField textField = new JTextField(); textField.setBounds(194, y_pos, 307, 20); textField.setColumns(10); section.add(textField); return textField; }
private JTextField cretateTextField(JPanel section,String name, int y_pos) { JLabel label = new JLabel(name); label.setBounds(10, y_pos, 174, 14); section.add(label); JTextField textField = new JTextField(); textField.setBounds(194, y_pos, 307, 20); textField.setColumns(10); section.add(textField); return textField; }
private JTextField cretateTextField(JPanel section,String name, int y_pos) { JLabel label = new JLabel(name); label.setBounds(10, y_pos, 174, 14); section.add(label); JTextField textField = new JTextField(); textField.setBounds(194, y_pos, 307, 20); textField.setColumns(10); section.add(textField); return textField; }