messagesArea.setRows(5); messagesArea.setWrapStyleWord(true); messagesArea.setFocusable(false); jScrollPane2.setViewportView(messagesArea);
/** * Retourne une étiquette pour la composante spécifiée. Le texte de l'étiquette pourra * éventuellement être distribué sur plusieurs lignes. * * @param owner Composante pour laquelle on construit une étiquette. L'étiquette aura la même * largeur que {@code owner}. * @param text Texte à placer dans l'étiquette. */ public static JComponent getMultilineLabelFor(final JComponent owner, final String text) { final JTextArea label = new JTextArea(text); final Dimension size = owner.getPreferredSize(); size.height = label.getMaximumSize().height; label.setMaximumSize(size); label.setWrapStyleWord(true); label.setLineWrap(true); label.setEditable(false); label.setFocusable(false); label.setOpaque(false); label.setBorder(null); // Certains L&F placent une bordure. LookAndFeel.installColorsAndFont( label, "Label.background", "Label.foreground", "Label.font"); return label; }
area.setWrapStyleWord(true); area.setEditable(false); area.setFocusable(true); area.getAccessibleContext().setAccessibleName(NbBundle.getMessage(NotifyDescriptor.class, "ACN_NotifyDescriptor_MessageJTextArea")); // NOI18N area.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(NotifyDescriptor.class, "ACD_NotifyDescriptor_MessageJTextArea")); // NOI18N
JTextArea textArea = new JTextArea(...); textArea.setFocusable( false );
private void initBottom() { content.setLineWrap(true); content.setEditable(false); content.setFocusable(false); content.setFont(font); mainWindow.add(content); }
private void initTop() { title.setFont(font); title.setEditable(false); title.setFocusable(false); title.setLineWrap(true); mainWindow.add(title); }
JTextArea ta = new JTextArea("A JTextArea containing a long text"); ta.setLineWrap(true); ta.setWrapStyleWord(true); ta.setOpaque(false); ta.setEditable(false); ta.setFocusable(false);
private JTextArea createTextArea(final Class<?> c, final String value) { classToCurrentValueMap.put(c, value); JTextArea area = new JTextArea(value); area.setFocusable(true); area.addFocusListener(new TextAreaFocusListener(area, c)); area.setColumns(DEFAULT_AREA_WIDTH); area.setLineWrap(true); area.setWrapStyleWord(true); classToAreaMap.put(c, area); logger.info("Adding to map " + c.getCanonicalName() + "(" + c.hashCode() + ") to " + area.hashCode()); return area; }
JTextArea ta = new JTextArea(1, 20); ta.setText("Enter the name of the repo and the name of the owner of that repo to search for open issues."); ta.setWrapStyleWord(true); ta.setLineWrap(true); ta.setBorder(null); ta.setFont(UIManager.getFont("Label.font")); ta.setOpaque(false); ta.setFocusable(false); ta.setEditable(false); //JLabel lblTop1 = new JLabel("<html>Enter the name of the repo and the name of the owner of that repo to search for open issues", JLabel.CENTER); //JLabel lblTop2 = new JLabel("owner of that repo to search for open issues.\n", JLabel.CENTER); //... //panTopTop.add(lblTop1); //panTopBottom.add(lblTop2); GridBagConstraints gbc = new GridBagConstraints(); gbc.gridwidth = GridBagConstraints.REMAINDER; panTop.add(ta, gbc);
protected void createDescription() { description = new javax.swing.JTextArea(); $objectMap.put("description", description); description.setName("description"); description.setColumns(15); description.setLineWrap(true); description.setWrapStyleWord(true); description.setFocusable(false); if (description.getFont() != null) description.setFont(description.getFont().deriveFont((float) 10)); description.setEditable(false); description.setRows(3); }
protected void createDescription() { $objectMap.put("description", description = new JTextArea()); description.setName("description"); description.setColumns(15); description.setLineWrap(true); description.setWrapStyleWord(true); description.setEditable(false); if (description.getFont() != null) { description.setFont(description.getFont().deriveFont((float) 10)); } description.setFocusable(false); description.setRows(3); }
protected void createDescription() { $objectMap.put("description", description = new JTextArea()); description.setName("description"); description.setColumns(15); description.setLineWrap(true); description.setWrapStyleWord(true); description.setEditable(false); if (description.getFont() != null) { description.setFont(description.getFont().deriveFont((float) 10)); } description.setFocusable(false); description.setRows(3); }
protected void createDescription() { $objectMap.put("description", description = new JTextArea()); description.setName("description"); description.setColumns(15); description.setLineWrap(true); description.setWrapStyleWord(true); description.setEditable(false); if (description.getFont() != null) { description.setFont(description.getFont().deriveFont((float) 10)); } description.setFocusable(false); description.setRows(3); }
private static JScrollPane getScrollableMessage() { String message = "Thank you for downloading my program. I hope it encourages" + " you to create awesome models. If you do create something awesome, I" + " would love to see it. You can post your screenshots to me via Twitter" + " or Facebook. If you are unsure how to use anything works, hover your " + "mouse over the component and it will tell you what it does." + "\n\n" + "I've put a lot of work into this program, so if you are " + "feeling generous, you can donate by clicking the button below. Thank you!" + ""; JTextArea textArea = new JTextArea(message); textArea.setEditable(false); textArea.setCursor(null); textArea.setFocusable(false); textArea.setBorder(null); textArea.setOpaque(false); textArea.setLineWrap(true); textArea.setWrapStyleWord(true); JScrollPane scrollPane = new JScrollPane(textArea); scrollPane.setBorder(null); return scrollPane; }
public void addTextRow( String text ) { gridC.fill = GridBagConstraints.HORIZONTAL; gridC.weighty = 0.0; gridC.gridwidth = GridBagConstraints.REMAINDER; gridC.gridx = 0; gridC.anchor = GridBagConstraints.WEST; JTextArea textArea = new JTextArea( text ); textArea.setBackground( null ); textArea.setEditable( false ); textArea.setBorder( null ); textArea.setLineWrap( true ); textArea.setWrapStyleWord( true ); textArea.setFocusable( false ); textArea.setFont( UIManager.getFont( "Label.font" ) ); this.add( textArea, gridC ); gridC.gridy++; }
public InfoPanel() { setPreferredSize(new Dimension(WIDTH, HEIGHT)); GroupLayout layout = new GroupLayout(this); layout.setAutoCreateContainerGaps(true); layout.setAutoCreateGaps(true); setLayout(layout); textArea = new JTextArea(); textArea.setBounds(5, 5, 630, 30); textArea.setEditable(false); textArea.setFocusable(false); layout.setHorizontalGroup(layout.createParallelGroup().addComponent(textArea)); layout.setVerticalGroup(layout.createSequentialGroup().addComponent(textArea)); }
public void setExecutandoPrograma(boolean executandoPrograma) { this.executandoPrograma = executandoPrograma; if (!executandoPrograma) { ((DocumentoConsole) console.getDocument()).setLendo(false); console.setEditable(false); console.setFocusable(false); } atualizarItensMenuConsole(); }
private void showExportTap() { cardLayout.show(jContent, AccountImportCard.SHARE_EXPORT.name()); jPrevious.setEnabled(true); jNext.setEnabled(true); jNext.setText(DialoguesAccount.get().ok()); try { String value = esiOwner.getCallbackURL().name() + " " + esiOwner.getRefreshToken(); String code = new String(Base64.getUrlEncoder().encode(value.getBytes(StandardCharsets.UTF_8)), "UTF-8").replace("=", ""); jExport.setText(code); jExport.setFocusable(true); jExportClipboard.setEnabled(true); jExportFile.setEnabled(true); } catch (UnsupportedEncodingException ex) { jExport.setText(DialoguesAccount.get().shareExportFail()); jExport.setFocusable(false); jExportClipboard.setEnabled(false); jExportFile.setEnabled(false); } }
@Override public void solicitaEntrada(final TipoDado tipoDado, final Armazenador armazenador) throws InterruptedException { SwingUtilities.invokeLater(() -> { AbaConsole.this.selecionar(); setLendo(true); abaCodigoFonte.exibirPainelSaida(); DocumentoConsole.this.armazenador = armazenador; DocumentoConsole.this.tipoDado = tipoDado; console.setEditable(true); console.setFocusable(true); console.getCaret().setVisible(true); console.setCaretPosition(console.getText().length()); console.requestFocusInWindow(); agendarPopupLeia(); }); }
public ChooseDirectory() { setLayout(new PercentLayout(PercentLayout.VERTICAL, 3)); if (System.getProperty("javawebstart.version") != null) { JTextArea area = new JTextArea(RESOURCE.getString("message.webstart")); LookAndFeelTweaks.makeMultilineLabel(area); area.setFocusable(false); add(area); } final JButton button = new JButton(RESOURCE.getString("selectDirectory")); add(button); button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { selectDirectory(button, null); } }); }