Ariel Araújo

Respostas no Fórum

Visualizando 3 posts - 1 até 3 (de 3 do total)
  • Autor
    Posts
  • em resposta a: Java #130882
    Ariel Araújo
    Participante

    Ja consegui resolver meu problema, muito obrigado

    em resposta a: Java #130880
    Ariel Araújo
    Participante

    Estou na aula 5, introdução ao javafx e swing

    em resposta a: Java #130827
    Ariel Araújo
    Participante

    /*
    * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
    * Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this template
    */
    package cursoemvideo.olamundo;

    /**
    *
    * @author Ariel
    */
    public class OlaMundoJava extends javax.swing.JFrame {

    /**
    * Creates new form OlaMundoJava
    */
    public OlaMundoJava() {
    initComponents();
    }

    /**
    * This method is called from within the constructor to initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is always
    * regenerated by the Form Editor.
    */
    @SuppressWarnings(“unchecked”)
    // <editor-fold defaultstate=”collapsed” desc=”Generated Code”>
    private void initComponents() {

    lblMensagem = new javax.swing.JLabel();
    btnClick = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

    lblMensagem.setBackground(new java.awt.Color(255, 51, 0));
    lblMensagem.setFont(new java.awt.Font(“Dialog”, 0, 14)); // NOI18N
    lblMensagem.setForeground(new java.awt.Color(255, 51, 0));
    lblMensagem.setText(“Aqui vai aparecer a mensagem!”);

    btnClick.setFont(new java.awt.Font(“Dialog”, 0, 14)); // NOI18N
    btnClick.setForeground(new java.awt.Color(255, 255, 0));
    btnClick.setText(“Clique em mim!”);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addGap(72, 72, 72)
    .addComponent(lblMensagem))
    .addGroup(layout.createSequentialGroup()
    .addGap(112, 112, 112)
    .addComponent(btnClick)))
    .addContainerGap(82, Short.MAX_VALUE))
    );
    layout.setVerticalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addGap(90, 90, 90)
    .addComponent(lblMensagem)
    .addGap(18, 18, 18)
    .addComponent(btnClick, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addContainerGap(72, Short.MAX_VALUE))
    );

    pack();
    }// </editor-fold>

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
    /* Set the Nimbus look and feel */
    //<editor-fold defaultstate=”collapsed” desc=” Look and feel setting code (optional) “>
    /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
    * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
    */
    try {
    for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
    if (“Nimbus”.equals(info.getName())) {
    javax.swing.UIManager.setLookAndFeel(info.getClassName());
    break;
    }
    }
    } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) {
    java.util.logging.Logger.getLogger(OlaMundoJava.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    }
    //</editor-fold>

    //</editor-fold>

    /* Create and display the form */
    java.awt.EventQueue.invokeLater(() -> {
    new OlaMundoJava().setVisible(true);
    });
    }

    // Variables declaration – do not modify
    private javax.swing.JButton btnClick;
    private javax.swing.JLabel lblMensagem;
    // End of variables declaration
    }

    • Esta resposta foi modificada 10 meses, 2 semanas atrás por Ariel Araújo. Razão: Tinha alguns codigos escondidos
Visualizando 3 posts - 1 até 3 (de 3 do total)