y cuando coloco "extends javax.swing.JFrame" hace lo contrario reconoce "setTitle" pero no "getResourceMap" hay una manera de colocar las dos extensiones? estare agradecido saludos
"extends FrameView"
Código:
"extends javax.swing.JFrame"package controlii; import jPicUsb.*; import org.jdesktop.application.Action; import org.jdesktop.application.ResourceMap; import org.jdesktop.application.SingleFrameApplication; import org.jdesktop.application.FrameView; import org.jdesktop.application.TaskMonitor; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.Timer; import javax.swing.Icon; import javax.swing.JDialog; import javax.swing.JFrame; /** * The application's main frame. */ public class CONTROLIIView extends FrameView{ public byte cmd_FW = 99; public byte cmd_LED = 88; //EFECTOS private Timer efecto; private int efecto_state; private int efecto_actual; private static byte[][] efectos = {{(byte) 0xAA, (byte) 0x55}, {(byte) 0x00, (byte) 0x18, (byte) 0x24, (byte) 0x42, (byte) 0x81}}; public CONTROLIIView() { initComponents(); this.setTitle("jPicUsb Led Show"); try { iface.load(); setTitle("Golf Bar Graphic Interface"); } catch (Exception e) { setTitle(e.getMessage()); System.out.println(e.getMessage()); } //configuramos el vid_pid del dispositivo asi podemos usar las funciones "rapidas" de la interfaz iface.set_vidpid("vid_04d8&pid_000b"); //configuramos la instancia del dispositivo asi podemos usar las funciones "rapidas" de la interfaz iface.set_instance(0); //efecto efecto = new Timer(300, new ActionListener() { public void actionPerformed(ActionEvent e) { efecto_next_frame(); } }); sliderv.setValue(300); sliderb.setValue(300); sliderd.setValue(300); } public CONTROLIIView(SingleFrameApplication app) { super(app); initComponents(); // status bar initialization - message timeout, idle icon and busy animation, etc ResourceMap resourceMap = getResourceMap(); int messageTimeout = resourceMap.getInteger("StatusBar.messageTimeout"); messageTimer = new Timer(messageTimeout, new ActionListener() { public void actionPerformed(ActionEvent e) { statusMessageLabel.setText(""); } });
Código:
package controlii; import jPicUsb.*; import org.jdesktop.application.Action; import org.jdesktop.application.ResourceMap; import org.jdesktop.application.SingleFrameApplication; import org.jdesktop.application.FrameView; import org.jdesktop.application.TaskMonitor; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.Timer; import javax.swing.Icon; import javax.swing.JDialog; import javax.swing.JFrame; /** * The application's main frame. */ public class CONTROLIIView extends javax.swing.JFrame{ public byte cmd_FW = 99; public byte cmd_LED = 88; //EFECTOS private Timer efecto; private int efecto_state; private int efecto_actual; private static byte[][] efectos = {{(byte) 0xAA, (byte) 0x55}, {(byte) 0x00, (byte) 0x18, (byte) 0x24, (byte) 0x42, (byte) 0x81}}; public CONTROLIIView() { initComponents(); this.setTitle("jPicUsb Led Show"); try { iface.load(); setTitle("Golf Bar Graphic Interface"); } catch (Exception e) { setTitle(e.getMessage()); System.out.println(e.getMessage()); } //configuramos el vid_pid del dispositivo asi podemos usar las funciones "rapidas" de la interfaz iface.set_vidpid("vid_04d8&pid_000b"); //configuramos la instancia del dispositivo asi podemos usar las funciones "rapidas" de la interfaz iface.set_instance(0); //efecto efecto = new Timer(300, new ActionListener() { public void actionPerformed(ActionEvent e) { efecto_next_frame(); } }); sliderv.setValue(300); sliderb.setValue(300); sliderd.setValue(300); } public CONTROLIIView(SingleFrameApplication app) { super(app); initComponents(); // status bar initialization - message timeout, idle icon and busy animation, etc ResourceMap resourceMap = getResourceMap(); int messageTimeout = resourceMap.getInteger("StatusBar.messageTimeout"); messageTimer = new Timer(messageTimeout, new ActionListener() { public void actionPerformed(ActionEvent e) { statusMessageLabel.setText(""); } });