Refine search
public JTextField getFontSizeTextField() { if (fontSizeTextField == null) { fontSizeTextField = new JTextField(); fontSizeTextField.addFocusListener(new TextFieldFocusHandlerForTextSelection(fontSizeTextField)); fontSizeTextField.addKeyListener(new TextFieldKeyHandlerForListSelectionUpDown(getFontSizeList())); fontSizeTextField.getDocument() .addDocumentListener(new ListSearchTextFieldDocumentHandler(getFontSizeList())); fontSizeTextField.setFont(DEFAULT_FONT); } return fontSizeTextField; }
import java.awt.*; import javax.swing.*; public class CopyTextNorthPanel2 extends JPanel { private static final long serialVersionUID = 1L; public JTextField northField; public CopyTextNorthPanel2() { northField = new JTextField("Welcome World"); northField.setFont(new Font("Serif", Font.BOLD, 20)); northField.setPreferredSize(new Dimension(300, 25)); add(northField); } public String getNorthFieldText() { return northField.getText(); } }
title.setFont(new Font("Arial", Font.BOLD, 14)); c.gridx = 0; c.gridy = 0; description.setFont(new Font("Arial", Font.PLAIN, 11)); c.gridx = 0; c.gridy = 1; label1.setFont(new Font("Arial", Font.BOLD, 12)); c.gridx = 0; c.gridy = 2; page.add(processList); descLabel = new JTextField(defaultDesc, 35); descLabel.setEditable(false); Border border = new LineBorder(this.getPanel().getBackground(), 0); descLabel.setBorder(border); descLabel.setFont(new Font("Arial", Font.PLAIN, 11)); c.gridx = 1; c.gridy = 3;
public JTextField getFontStyleTextField() { if (fontStyleTextField == null) { fontStyleTextField = new JTextField(); fontStyleTextField.addFocusListener(new TextFieldFocusHandlerForTextSelection(fontStyleTextField)); fontStyleTextField.addKeyListener(new TextFieldKeyHandlerForListSelectionUpDown(getFontStyleList())); fontStyleTextField.getDocument() .addDocumentListener(new ListSearchTextFieldDocumentHandler(getFontStyleList())); fontStyleTextField.setFont(DEFAULT_FONT); } return fontStyleTextField; }
jLabel3 = new JLabel(); title = new JTextField(); jScrollPane2 = new JScrollPane(); jLabel1.setFont(new Font("Times New Roman", 1, 18)); jLabel1.setForeground(textColor); jLabel1.setText(message); jLabel3.setText("Selected:"); title.setFont(new Font("Tahoma", 1, 11)); title.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2)); rows.setFont(new Font("Times New Roman", 1, 17)); rows.setBorder(BorderFactory.createEmptyBorder()); rows.addMouseWheelListener(this);
public JTextField getFontFamilyTextField() { if (fontFamilyTextField == null) { fontFamilyTextField = new JTextField(); fontFamilyTextField.addFocusListener(new TextFieldFocusHandlerForTextSelection(fontFamilyTextField)); fontFamilyTextField.addKeyListener(new TextFieldKeyHandlerForListSelectionUpDown(getFontFamilyList())); fontFamilyTextField.getDocument() .addDocumentListener(new ListSearchTextFieldDocumentHandler(getFontFamilyList())); fontFamilyTextField.setFont(DEFAULT_FONT); } return fontFamilyTextField; }
JTextField textField = new JTextField(); textField.setFont(new Font("Verdana", 1, 12)); textField.setBorder(new LineBorder(Color.BLACK)); DefaultCellEditor dce = new DefaultCellEditor( textField ); myTable.getColumnModel().getColumn(1).setCellEditor(dce);
myParent = editor.getContentComponent(); myLabel = new JLabel(prompt); myEntry = new JTextField(); myEntry.setFont(font);
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { Font f = table.getCellRenderer(row, column).getTableCellRendererComponent(table, "", false, false, row, column).getFont(); textField.setFont(new Font(f.getName(), f.getStyle(), f.getSize())); textField.setText(value.toString()); return textField; }
/** * Generates a text field with copy-paste-cut popup menu. * * @return */ public static JTextField textFieldWithCopyPastePopup() { JTextField textField = new JTextField(); textField.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 13)); addTextContextMenu(textField, Arrays.asList(COPY, PASTE, CUT)); addTextMouseClickFocusListener(textField); return textField; }
protected JTextComponent createField() { JTextField textField = new JTextField(); textField.putClientProperty("JComponent.sizeVariant", "small"); textField.setFont(Theme.SMALL_BOLD_FONT); textField.addActionListener(this); textField.addFocusListener(new FocusAdapter() { public void focusLost(FocusEvent e) { commitTextFieldValue(); } }); return textField; }
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { Font f = table.getCellRenderer(row, column).getTableCellRendererComponent(table, "", false, false, row, column).getFont(); textField.setFont(new Font(f.getName(), f.getStyle(), f.getSize())); textField.setText(value.toString()); return textField; }
/** * This method initializes jTextField12 * * @return JTextField */ private JTextField getJTextField12() { if(jTextField12 == null) { jTextField12 = new JTextField(); jTextField12.setBounds(138, 16, 202, 16); jTextField12.setFont(new java.awt.Font("sansserif", 1, 10)); jTextField12.setText(ClientScenario.getServicePort()); } return jTextField12; } } // @jve:visual-info decl-index=0 visual-constraint="0,0"
public FileControl(String nodePath, Port port) { super(nodePath, port); setLayout(new FlowLayout(FlowLayout.LEADING, 0, 0)); fileField = new JTextField(); fileField.putClientProperty("JComponent.sizeVariant", "small"); fileField.setPreferredSize(new Dimension(150, 19)); fileField.setEditable(false); fileField.setFont(Theme.SMALL_BOLD_FONT); chooseButton = new JButton("..."); chooseButton.putClientProperty("JButton.buttonType", "gradient"); chooseButton.setPreferredSize(new Dimension(30, 27)); chooseButton.addActionListener(this); add(fileField); add(chooseButton); setValueForControl(port.getValue()); }
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { Font f = table.getCellRenderer(row, column).getTableCellRendererComponent(table, "", false, false, row, column).getFont(); textField.setFont(new Font(f.getName(), f.getStyle(), f.getSize())); textField.setText(value.toString()); return textField; }
/** * This method initializes jTextField12 * * @return JTextField */ private JTextField getJTextField12() { if(jTextField12 == null) { jTextField12 = new JTextField(); jTextField12.setBounds(138, 16, 202, 16); jTextField12.setFont(new java.awt.Font("sansserif", 1, 10)); jTextField12.setText(ClientScenario.getServicePort()); } return jTextField12; } } // @jve:visual-info decl-index=0 visual-constraint="0,0"
public TextControl(String nodePath, Port port) { super(nodePath, port); setLayout(new BorderLayout(0, 0)); textField = new JTextField(); textField.putClientProperty("JComponent.sizeVariant", "small"); textField.setFont(Theme.SMALL_BOLD_FONT); textField.addActionListener(this); externalWindowButton = new JButton("..."); externalWindowButton.putClientProperty("JComponent.sizeVariant", "small"); externalWindowButton.putClientProperty("JButton.buttonType", "gradient"); externalWindowButton.setFont(Theme.SMALL_BOLD_FONT); externalWindowButton.addActionListener(this); add(textField, BorderLayout.CENTER); add(externalWindowButton, BorderLayout.EAST); setValueForControl(port.getValue()); }