Newsgroup: it.comp.java
Titolo: [Newbie] esecuzione applicazione Gui

Scusate la domanda stupida ma cerco da giorni senza esito!
Vorrei cominciare a realizzare qualche applicazione in java con interfaccia 
grafica.
premetto che mi sono studiato il linguaggio, simile al c++, che già un pò 
conosco.
Ho installato Jdk, jre, sdk ide netbeans..
ho realizzato una piccola applicazione di prova che mi restituisce una somma 
di 2 numeri tramite un frame e delle textfield.
la compilo, tutto ok la eseguo tutto ok nel debug ma nn compare nulla!
presumo che il frame nn compaia perchè manca la chiamata nella main class.
non so come fare a richiamarlo!
sarei grato se qualcuno mi aiutasse!
max

Hai costruito un nuovo frame?
Hai chiamato show(true) nel frame ?
Per vedere se  qualcosa sta girando guarda il task manager.
Se non risolvi posta il codice

 Hai chiamato show(true) nel frame ?
no,
dove si chiama, e come?
questo è il codice del frame:
/*
 * Frame1.java
 *
 * Created on 22 novembre 2007, 10.36
 */
package javaapplication5;
/**
 *
 * @author  max
 */
public class Frame1 extends javax.swing.JFrame {
    /** Creates new form Frame1 */
    public Frame1() {
        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.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">
    private void initComponents() {
        jPanel1 = new javax.swing.JPanel();
        txtIngresso = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jTextField2 = new javax.swing.JTextField();
        txtFileTesto = new javax.swing.JTextField();
        cmdApriTxt = new javax.swing.JToggleButton();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jButton3 = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        jButton4 = new javax.swing.JButton();
        jButton5 = new javax.swing.JButton();
        jPanel3 = new javax.swing.JPanel();
        jButton6 = new javax.swing.JButton();
        jButton7 = new javax.swing.JButton();
        jButton8 = new javax.swing.JButton();
        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                formFocusGained(evt);
            }
            public void focusLost(java.awt.event.FocusEvent evt) {
                formFocusLost(evt);
            }
        });
        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Percorso 
Files"));
        jPanel1.setToolTipText("Scegli il percorso del file da esportare ed 
il percorso dei files da creare;\nNB. i files esportati sono 2 il primo crea 
un file di testo per stampa cartacea il secondo crea un file che pu\u00f2 
essere importato nel datagraph");
        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel1.setText("Path Ingresso");
        jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel2.setText("Esport TXT");
        jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel3.setText("File Datagraph");
        cmdApriTxt.setText("...");
        jButton1.setText("...");
        jButton2.setText("...");
        jButton3.setText("...");
        javax.swing.GroupLayout jPanel1Layout = new 
javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, 
false)
                    .addComponent(jLabel3, 
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, 
Short.MAX_VALUE)
                    .addComponent(jLabel2, 
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, 
Short.MAX_VALUE)
                    .addComponent(jLabel1, 
javax.swing.GroupLayout.DEFAULT_SIZE, 78, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, 
false)
                    .addComponent(txtIngresso)
                    .addComponent(txtFileTesto)
                    .addComponent(jTextField2, 
javax.swing.GroupLayout.DEFAULT_SIZE, 311, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, 
jPanel1Layout.createSequentialGroup()
                        .addComponent(cmdApriTxt, 
javax.swing.GroupLayout.PREFERRED_SIZE, 0, 
javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButton2, 
javax.swing.GroupLayout.PREFERRED_SIZE, 33, 
javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jButton1, 
javax.swing.GroupLayout.Alignment.TRAILING, 
javax.swing.GroupLayout.PREFERRED_SIZE, 33, 
javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton3, 
javax.swing.GroupLayout.Alignment.TRAILING, 
javax.swing.GroupLayout.PREFERRED_SIZE, 33, 
javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(52, 52, 52))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(txtIngresso, 
javax.swing.GroupLayout.PREFERRED_SIZE, 
javax.swing.GroupLayout.DEFAULT_SIZE, 
javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(txtFileTesto, 
javax.swing.GroupLayout.PREFERRED_SIZE, 
javax.swing.GroupLayout.DEFAULT_SIZE, 
javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(cmdApriTxt)
                    .addComponent(jButton2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(jTextField2, 
javax.swing.GroupLayout.PREFERRED_SIZE, 
javax.swing.GroupLayout.DEFAULT_SIZE, 
javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton3))
                .addContainerGap(14, Short.MAX_VALUE))
        );
        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Crea 
File per Pagamenti Datagraph"));
        jButton4.setText("Esporta da TLQ");
        jButton5.setText("Esporta da PPTT");
        javax.swing.GroupLayout jPanel2Layout = new 
javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButton4, 
javax.swing.GroupLayout.Alignment.TRAILING, 
javax.swing.GroupLayout.DEFAULT_SIZE, 188, Short.MAX_VALUE)
                    .addComponent(jButton5, 
javax.swing.GroupLayout.DEFAULT_SIZE, 188, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addComponent(jButton4)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton5)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, 
Short.MAX_VALUE))
        );
        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Crea 
File di Testo"));
        jButton6.setText("Esporta da TLQ");
        jButton7.setText("Esporta da PPTT");
        javax.swing.GroupLayout jPanel3Layout = new 
javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, 
jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jButton7, 
javax.swing.GroupLayout.Alignment.LEADING, 
javax.swing.GroupLayout.DEFAULT_SIZE, 180, Short.MAX_VALUE)
                    .addComponent(jButton6, 
javax.swing.GroupLayout.Alignment.LEADING, 
javax.swing.GroupLayout.DEFAULT_SIZE, 180, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addComponent(jButton6)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton7)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, 
Short.MAX_VALUE))
        );
        jButton8.setText("Esci");
        javax.swing.GroupLayout layout = new 
javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel1, 
javax.swing.GroupLayout.DEFAULT_SIZE, 459, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jPanel2, 
javax.swing.GroupLayout.PREFERRED_SIZE, 
javax.swing.GroupLayout.DEFAULT_SIZE, 
javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 
27, Short.MAX_VALUE)
                        .addComponent(jPanel3, 
javax.swing.GroupLayout.PREFERRED_SIZE, 
javax.swing.GroupLayout.DEFAULT_SIZE, 
javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jButton8, 
javax.swing.GroupLayout.Alignment.TRAILING))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, 
javax.swing.GroupLayout.PREFERRED_SIZE, 
javax.swing.GroupLayout.DEFAULT_SIZE, 
javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, 
false)
                    .addComponent(jPanel3, 
javax.swing.GroupLayout.Alignment.TRAILING, 
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, 
Short.MAX_VALUE)
                    .addComponent(jPanel2, 
javax.swing.GroupLayout.Alignment.TRAILING, 
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, 
Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton8)
                .addGap(11, 11, 11))
        );
        pack();
    }// </editor-fold>
    private void formFocusLost(java.awt.event.FocusEvent evt) {
// TODO add your handling code here:
    }
    private void formFocusGained(java.awt.event.FocusEvent evt) {
// TODO add your handling code here:
    }
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Frame1().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify
    private javax.swing.JToggleButton cmdApriTxt;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButton5;
    private javax.swing.JButton jButton6;
    private javax.swing.JButton jButton7;
    private javax.swing.JButton jButton8;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JTextField jTextField2;
    private javax.swing.JTextField txtFileTesto;
    private javax.swing.JTextField txtIngresso;
    // End of variables declaration
}
e questo della main class
/*
 * Main.java
 *
 * Created on 22 novembre 2007, 10.35
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */
package javaapplication5;
/**
 *
 * @author max
 */
public class Main {
    /** Creates a new instance of Main */
    public Main() {
    }
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
    }
}
grazie 

 grazie
Ciao,
non vedo l'istanziazione del Frame1 nel main().
Ciao Jack
PS: consiglio, per imparare EVITA netbeans (e anche Eclipse), usa un
semplice editor (magari col syntax coloring), ma evita le IDE.
Tanto per capirci, a mano facevi la stessa cosa con un terzo del
codice.

nel corpo del main verso la fine del programma da te scritto mettici
new Frame1().setVisible(true);

 codice.
che non ci sia l'istanziazione l'avevo capito....il problema è che nn so 
come fare ad istanziarlo!
purtroppo i manuali parlano di cicli for next, if then array ecc che sono 
l'aspetto più semplice di java...
il vero problema per un newbie come me è capire dove trovare e come usare il 
miliardo di classi che java contiene!
siamo daccordo che senza ide facevo con meno codice.....ma dove lo andavo a 
trovare il metodo 
jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); ?? per 
citare il più semplce.
io vengo dal dal VB e dal C......a differenza qua c'è già tutto pronto ma, 
anche nella guida, non si riesce a capire da dove vengono tutte quelle 
classi e come si usano!
vorrei sapere più dove cercare che come fare..
grazie

 new Frame1().setVisible(true);
sono commosso!
grazie