Programación General > Java

 Problemas Con Editplus

(1/1)

gdelobo:
Les explico quiero usar este programa porque es el más rapido y con unas configuraciones me deja compilar y ejecutar los programas rapidamente
El codigo es este

--- Código: Text ---//XXX: Metalworks is the only desktop-using app I looked at.  This follows//XXX: its lead.  How will these desktop apps usually be arranged?  Really//XXX: a menu at the top of the main JFrame? //XXX: You might think of using a JWindow to house the JDesktopPane, but//XXX: JWindows behave badly.  They *always* stay in front.  And you can't//XXX: miniaturize them. import javax.swing.JInternalFrame;import javax.swing.JDesktopPane;import javax.swing.JMenu;import javax.swing.JMenuItem;import javax.swing.JMenuBar;import javax.swing.JFrame;  import java.awt.event.*;import java.awt.*; public class InternalFrameDemo extends JFrame{     JDesktopPane desktop;     public InternalFrameDemo() {        super("InternalFrameDemo");         //Make the big window be indented 50 pixels from each edge         //of the screen.        int inset = 50;        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();        setBounds(inset, inset,                   screenSize.width - inset*2,                   screenSize.height-inset*2);         //Quit this app when the big window closes.        addWindowListener(new WindowAdapter() {//XXX: Notes for Kathy.//XXX: common problem: windowClosing or other event method ignored.//XXX: did you add it as a listener?  Did you define the method right,//XXX: E.g., is it public void, spelled right, and have the right kind//XXX: of argument (issue for adapter subclasses).            public void windowClosing(WindowEvent e) {                System.exit(0);            }        });         //Set up the GUI.        desktop = new JDesktopPane(); //a specialized layered pane        createFrame(); //Create first window         setContentPane(desktop);        setJMenuBar(createMenuBar());    }     protected JMenuBar createMenuBar() {        JMenuBar menuBar = new JMenuBar();         JMenu menu = new JMenu("Document");        JMenuItem menuItem = new JMenuItem("New");        menuItem.addActionListener(new ActionListener() {            public void actionPerformed(ActionEvent e) {                createFrame();            }        });        menu.add(menuItem);        menuBar.add(menu);         return menuBar;    }     protected void createFrame() {        MyInternalFrame frame = new MyInternalFrame();        desktop.add(frame);        try {            frame.setSelected(true);        } catch (java.beans.PropertyVetoException e2) {}    }     public static void main(String[] args) {        InternalFrameDemo frame = new InternalFrameDemo();        frame.setVisible(true);    }}  
y el codigo de el Frame interno es

--- Código: Text --- import javax.swing.JInternalFrame; import java.awt.event.*;import java.awt.*; //XXX: Note: setVisible(true) has a different implementation than//XXX: show().  This seems highly bogus -- the setVisible(true)//XXX: method was supposed to replace show() -- not add another//XXX: method.public class MyInternalFrame extends JInternalFrame {     static int openFrameCount = 0;    static final int xOffset = 30, yOffset = 30;     public MyInternalFrame() {        super("Document #" + (++openFrameCount),               true, //resizable              true, //closable              true, //maximizable              true);//iconifiable         //...Create the GUI and put it in the window...        //...Then set the window size or call pack...    pack();        setSize(300,300);         //Set the window's location.        setLocation(xOffset*openFrameCount, yOffset*openFrameCount);    }}  
Esto supuestamente  levantaria un jinternalframe pero cuando clickeo new no hace naranja, cuando lo hago dentro funca sin problemas, y cuando pongo packages no los reconoce la version jdk 1.2

gdelobo:
Tengo la sensacion que puede ser el programa pero en el Jcreator lo probe y me hace lo mismo y lo compile a mano y tambien me hace lo mismo les digo bien la version de java j2sdk1.4.2_15

gdelobo:
Bueno el tema inicial esta solucionado, era un ejemplo de sun que no me funcionaba y queria probar en diferentes ides a ver que tal me quedo con el JGrasp con su jdk, en la parte final de myInternalFrame faltaba un show();
y me muestra lo que debe hacer .

Gracias igual porque mientras buceaba encontre el JGrasp y muchos articulos interesantes.... :kicking:

Navegación

[0] Índice de Mensajes

Ir a la versión completa