Package Com
Package Com
workbenchprovis;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/**
*
* @author Camil
*/
public class JFrmVentana_Principal extends javax.swing.JFrame {
/**
* Creates new form JFrmVentana_Principal
*/
public JFrmVentana_Principal() {
initComponents();
initCustomComponents();
}
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jMenu_Archivo.setLabel("Archivo");
jMenuItem_Salir.setText("Salir");
jMenu_Archivo.add(jMenuItem_Salir);
Abrir.add(jMenu_Archivo);
jMenu_Editar.setText("Editar");
jMenu_Nuevo.setText("Nuevo");
jMenuItem2.setText("Nueva Imagen");
jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem2ActionPerformed(evt);
}
});
jMenu_Nuevo.add(jMenuItem2);
jMenu_Editar.add(jMenu_Nuevo);
Abrir.add(jMenu_Editar);
setJMenuBar(Abrir);
javax.swing.GroupLayout layout = new
javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 506, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 443, Short.MAX_VALUE)
);
pack();
}// </editor-fold>
private void initComponents(){
jScrollPane1 = new javax.swing.JScrollPane();
jTextPane1 = new javax.swing.JTextPane();
Abrir = new javax.swing.JMenuBar();
jMenu_Archivo = new javax.swing.JMenu();
jMenuItem_Salir = new javax.swing.JMenuItem();
jMenu_Editar = new javax.swing.JMenu();
jMenu_Nuevo = new javax.swing.JMenu();
jMenuItem2 = new javax.swing.JMenuItem();
jScrollPane1.setViewportView(jTextPane1);
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jMenu_Archivo.setLabel("Archivo");
jMenuItem_Salir.setText("Salir");
jMenuItem_Salir.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem_SalirActionPerformed(evt);
}
});
jMenu_Archivo.add(jMenuItem_Salir);
Abrir.add(jMenu_Archivo);
jMenu_Editar.setText("Editar");
jMenu_Nuevo.setText("Nuevo");
jMenuItem2.setText("Nueva Imagen");
jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem2ActionPerformed(evt);
}
});
jMenu_Nuevo.add(jMenuItem2);
jMenu_Editar.add(jMenu_Nuevo);
Abrir.add(jMenu_Editar);
setJMenuBar(Abrir);
javax.swing.GroupLayout layout = new
javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 506, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 421, Short.MAX_VALUE)
);
pack();
}// </editor-fold>
}
private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
/**
* @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 ex) {
java.util.logging.Logger.getLogger(JFrmVentana_Principal.class.getName()).log(j
ava.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(JFrmVentana_Principal.class.getName()).log(j
ava.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(JFrmVentana_Principal.class.getName()).log(j
ava.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(JFrmVentana_Principal.class.getName()).log(j
ava.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
/**
*
* @author Camil
*/
public class JFrmVentana_Principal extends javax.swing.JFrame {
/**
* Creates new form JFrmVentana_Principal
*/
public JFrmVentana_Principal() {
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() {
jScrollPane1.setViewportView(jTextPane1);
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jMenu_Archivo.setText("Archivo");
jMenuItem_Abrir.setText("Abrir");
jMenuItem_Abrir.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem_AbrirActionPerformed(evt);
}
});
jMenu_Archivo.add(jMenuItem_Abrir);
jMenuItem_Nuevo.setText("Nuevo");
jMenu_Archivo.add(jMenuItem_Nuevo);
jMenuItem_Salir.setText("Salir");
jMenu_Archivo.add(jMenuItem_Salir);
Abrir.add(jMenu_Archivo);
jMenu_Editar.setText("Editar");
Abrir.add(jMenu_Editar);
jMenu_Vista.setText("Vista");
jMenuItem1.setText("jMenuItem1");
jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem1ActionPerformed(evt);
}
});
jMenu_Vista.add(jMenuItem1);
Abrir.add(jMenu_Vista);
setJMenuBar(Abrir);
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 506, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 421, Short.MAX_VALUE)
);
pack();
}// </editor-fold>
private void jMenuItem_AbrirActionPerformed(java.awt.event.ActionEvent
evt) {
// TODO add your handling code here:
}
java.util.logging.Logger.getLogger(JFrmVentana_Principal.class.getName()).log(j
ava.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(JFrmVentana_Principal.class.getName()).log(j
ava.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(JFrmVentana_Principal.class.getName()).log(j
ava.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(JFrmVentana_Principal.class.getName()).log(j
ava.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>