GUI - Using NetBeans

Hi,
I am new to using NetBeans and have built a basic GUI using it. However, I want to change the background colour of my GUI to black and cant see how to do this using NetBeans. Please could someone explain to me how to do this.
My code is as follows :-
* GUIII.java
* Created on 29 November 2007, 19:47
package my.GUIII;
public class GUIII extends javax.swing.JFrame {
/** Creates new form GUIII */
public GUIII() {
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() {
jLabel1 = new javax.swing.JLabel();
jDialog1 = new javax.swing.JDialog();
jPanel1 = new javax.swing.JPanel();
jButton5 = new javax.swing.JButton();
jButton4 = new javax.swing.JButton();
jButton3 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jButton1 = new javax.swing.JButton();
jLabel2 = new javax.swing.JLabel();
jLabel1.setText("jLabel1");
javax.swing.GroupLayout jDialog1Layout = new javax.swing.GroupLayout(jDialog1.getContentPane());
jDialog1.getContentPane().setLayout(jDialog1Layout);
jDialog1Layout.setHorizontalGroup(
jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 400, Short.MAX_VALUE)
jDialog1Layout.setVerticalGroup(
jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 300, Short.MAX_VALUE)
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Guiness Rugby League");
setBackground(new java.awt.Color(0, 0, 0));
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
jButton5.setText("Exit");
jButton4.setText("Clear");
jButton3.setText("Update Database");
jButton2.setText("Read Database");
jButton1.setText("Read File");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addComponent(jButton1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jButton2)
.addGap(18, 18, 18)
.addComponent(jButton3)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton4)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton5)
.addGap(36, 36, 36))
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(20, 20, 20)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton1)
.addComponent(jButton3)
.addComponent(jButton4)
.addComponent(jButton5)
.addComponent(jButton2))
.addContainerGap(21, Short.MAX_VALUE))
jLabel2.setIcon(new javax.swing.ImageIcon("C:\\Users\\Blampied\\Desktop\\P_GPremLogo.gif")); // NOI18N
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(117, 117, 117)
.addComponent(jLabel2))
.addGroup(layout.createSequentialGroup()
.addGap(25, 25, 25)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 457, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(42, Short.MAX_VALUE))
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 446, Short.MAX_VALUE)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
pack();
}// </editor-fold>
private void jButton1ActionPerformed(java.awt.event.ActionEvent 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 GUIII().setVisible(true);
// Variables declaration - do not modify
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.JDialog jDialog1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JPanel jPanel1;
// End of variables declaration
}

Use Component's setBackground method; See this tutorial that has examples of its use:
http://java.sun.com/docs/books/tutorial/uiswing/components/jcomponent.html
Please post future Swing questions in the Swing forum.

Similar Messages

  • Created GUI using Matisse, can't get text on jPanel

    Hello, I am tying to build my first desktop application. I created a test GUI using Netbeans Matisse.
    When the button is pressed I want that the text string stored in the variable text appears on jPanel1. The String is retrieved from a database (that's not a problem).
    How to get the text onto jPanel1?
    Here's the GUI code:
    package prototype4;
    import java.awt.Color;
    import spin.Spin;
    public class newGUI extends javax.swing.JFrame {
        /** Creates new form newGUI */
        public newGUI() {
            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() {
            rolloverProducer1 = new org.jdesktop.swingx.RolloverProducer();
            jPanel1 = new javax.swing.JPanel();
            jPanel2 = new javax.swing.JPanel();
            jButton1 = new javax.swing.JButton();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
            jPanel1.setLayout(jPanel1Layout);
            jPanel1Layout.setHorizontalGroup(
                jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(0, 376, Short.MAX_VALUE)
            jPanel1Layout.setVerticalGroup(
                jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(0, 127, Short.MAX_VALUE)
            jButton1.setText("Start");
            jButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton1ActionPerformed(evt);
            org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
            jPanel2.setLayout(jPanel2Layout);
            jPanel2Layout.setHorizontalGroup(
                jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(jPanel2Layout.createSequentialGroup()
                    .add(140, 140, 140)
                    .add(jButton1)
                    .addContainerGap(173, Short.MAX_VALUE))
            jPanel2Layout.setVerticalGroup(
                jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel2Layout.createSequentialGroup()
                    .addContainerGap(39, Short.MAX_VALUE)
                    .add(jButton1)
                    .add(36, 36, 36))
            org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(layout.createSequentialGroup()
                    .addContainerGap()
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                        .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .add(jPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addContainerGap())
            layout.setVerticalGroup(
                layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(layout.createSequentialGroup()
                    .addContainerGap()
                    .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(55, Short.MAX_VALUE))
            pack();
        }// </editor-fold>                       
        private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
        // TODO add your handling code here:
        // spin off   
            DAOUser daouser = (DAOUser) Spin.off(new DAOUserImpl());
            String text = daouser.getString();
            System.out.println(text);
            //jPanel1.
         * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new newGUI().setVisible(true);
        // Variables declaration - do not modify                    
        private javax.swing.JButton jButton1;
        private javax.swing.JPanel jPanel1;
        private javax.swing.JPanel jPanel2;
        private org.jdesktop.swingx.RolloverProducer rolloverProducer1;
        // End of variables declaration                  
        }

    The code you posted is basically of no use to use since it uses custom Matisse classes.
    Learn how to write a Swing app without a GUI builder. Learn how to use Layout Managers on your own.
    If you want to display text on a panel then you would do:
    panel.add( label );
    panel.revalidate();
    Whos know what will happen with your code because I have no idea what the Matisse Layout Managers do.
    Read the Swing tutorial on [url
    http://java.sun.com/docs/books/tutorial/uiswing/layout/visual.html]How to Use Layout Managers.

  • Creating Web Services using Netbeans GUI only

    Hi all,
    Creating, deploying & testing simple web-services through Netbeans point-n-click interface is quite simple (demo at: http://download.java.net/javaee5/screencasts/hello-simple-glassfish/). The demo shows a very simple service creation scenario, accepting and returning String types only. The service can easily be tested using the GUI option 'Test Web Service', which simply test the service through a simple web page at http://localhost:8080/MyWebApplication/MyWebService?Tester
    In a similar manner, I am trying to implement a web service (a little complex one, accepting and returning custom types) using Netbeans GUI only. Versioning information I am using are as follows:
    NetBeans IDE 6.1
    Sun Java System Application Server 9.1_02 (build b04-fcs)
    JAX-WS 2.1.3.1
    Roughly speaking, the service's method signature I am using is shown below:
    public abstract myclass.X MyService.serviceMethod( myclass.X )
    Since it uses a custom type in parameter and return-types, the web-based test doesn't work any more. I wrote a separate client class to invoke the service using client-side stub classes (suppose to be generated by JAX-WS generated classes). The client code looks like as follows:
    public class ServiceClient {
         public static void main(String[] args) {
              MyService srv = new MyService ().getMyServicePort();
              X xin= new X();
              X xout= srv.serviceMethod( xin );
              System.out.println( "Result: "+ xout.toString());
    Netbeans shows a compiler error on "MyService srv = new MyService ().getMyServicePort();
    Is it possible to get it resolved without making use of ant scripts for generating client-side artifacts (stubs etc.)?
    Thanks,
    irfan

    Hello Sandy,
    Have you installed the Sun Java System App Server or JWSDP? If so, please make sure that one of the libraries in your Netbeans project contains the jaxrpc-api and jaxrpc-impl jars (which seem to be necessary to run wscompile).
    Netbeans ("standalone") doesn't seem to install the jaxrpx libraries and other jars required to compile and run webservices.
    Regards,
    Jonatan

  • How to display multiple tables from database using netbeans swing gui

    plz reply asap on how to display multiple tables from database using netbeans swing gui into the same project

    Layered Pane with JTables or you can easily to it with a little scripting and HTML.
    plzzzzzzzzzzzzzzzzz, do not use SMS speak when posting.

  • How do you create beans using NetBeans 5.5?

    I am referring to http://java.sun.com/docs/books/tutorial/javabeans/nb/index.html and I'm sorry but I can't follow any of this!
    I have NetBeans IDE 5.5 and I am trying to learn how to write beans using NetBeans, and the lessons involve things I can't find or understand, for example:
    re: http://java.sun.com/docs/books/tutorial/javabeans/writingbean/index.html
    <blockquote>
    Load the JAR file. Use the NetBeans IDE GUI Builder to load the jar file as follows:
    1. Start NetBeans.
    2. From the File menu select "New Project" to create a new application for your bean. You can use "Open Project" to add your bean to an existing application.
    3. Create a new application using the New Project Wizard.
    4. Select a newly created project in the List of Projects, expand the Source Packages node, and select the Default Package element.
    5. Click the right mouse button and select New|JFrameForm from the pop-up menu.
    6. Select the newly created Form node in the Project Tree. A blank form opens in the GUI Builder view of an Editor tab.
    7. Open the Palette Manager for Swing/AWT components by selecting Palette Manager in the Tools menu.
    8. In the Palette Manager window select the beans components in the Palette tree and press the "Add from JAR" button.
    9. Specify a location for your SimpleBean JAR file and follow the Add from JAR Wizard instructions.
    10. Select the Palette and Properties options from the Windows menu.
    11. Expand the beans group in the Palette window. The SimpleBean object appears. Drag the SimpleBean object to the GUI Builder panel.
    </blockquote>
    Sorry, you lost me literally after "Start NetBeans", the rest is Hungarian. I can't find "New Project Wizard"; I can't find "List of Projects", I can't find anything they are talking about nor do I know if any of this is relevant toward my learning how to write beans.
    Re: http://java.sun.com/docs/books/tutorial/javabeans/properties/properties.html
    "Inspecting Properties" seems impossible to do because the Inspector Window only shows a closed folder and nothing else ever. I can't figure out this part of the tutorial either.
    Can someone please explain this 3rd-grade-level to me: How to create a bean using NetBeans?
    Thanx
    Phil

    Phil,
    Before you embark on another very frustrating advanture using NetBeans, please go t hrough the NetBeans tutorial. The "New Project Wizard" is just select from the menu options -- "New Project". The "Hungarian" as you put it will not get better until you spend some time learning NetBeans. Learning something new, like beans, is frustrating enough, but to try to do it and use a tool that is not familiar may be beyond many individuals frustration level.
    Les

  • Creating GUI using a wizard

    Hi,
    I'm new to swing and until now have created GUI using MFC.
    Are there any wizard like tools, that help creating the UI while generating the adaquate code for me?
    Thanks.

    U can use JBuilder /NetBeans / Forte4 etc ..
    Lot of tools are available . u download and create GUI ...
    all the best !!

  • How to set JTable cell editable/non-editable dynamically using NetBean?

    I am using NetBean 6.5, create a database desktop application, I using the persistence entity manager to bind my JTable with database.
    Now, I want to set practicular cells which are enable and disable, I tried to create my own table model and override the isEditable() method, which it seems didn't work. I guessed the problem is the persistence connection between my Table and database.
    How can I solve it? Any example? I just googled the web and can't find example which use netbean combined with database. I know that a single JTable would work when creating your own model.
    thx.

    I know what coding i did, Yes u r right but im new to GUI programming only,
    That's why i posted it to forums, I gone through the Control Flow Statements link what u have given.
    U didnt get my question at all.
    Again the problem im facing is the table is already displayed with 2nd column uneditable.
    When some Action done on table, i need to make 2nd column editable at run time.
    Thanks if u provide me the solution instead of deciding what type of programmer im.

  • Port Programming Using Netbeans

    Hello everybody,
    I am working on Serial port communication, and I have used Netbeans for GUI designing.
    I am able access the port, but failed to set Event for the same.
    I am getting error like............
    D:\NetBeansProjects\MySerialPort\src\readserialport\MyComport.java:20: readserialport.MyComport is not abstract and does not override abstract method serialEvent(javax.comm.SerialPortEvent) in javax.comm.SerialPortEventListener
    Please help me to resolve this problem...............
    My code:
    * MyComport.java
    * Created on March 18, 2008, 5:43 PM
    package readserialport;
    import java.awt.*;
    import java.io.*;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.comm.*;
    import java.util.*;
    * @author pbagde
    class MyComport extends javax.swing.JFrame
    implements SerialPortEventListener{
    /** How long to wait for the open to finish up. **/
    public static final int TIMEOUTSECONDS = 30;
    /** The chosen Port Identifier **/
    CommPortIdentifier thePortID;
    /** The chosen Port itself **/
    CommPort thePort;
    /** A mapping from names to CommPortIdentifiers. **/
    protected HashMap map = new HashMap();
    /** The name of the choice the user made. **/
    protected String selectedPortName;
    /** The CommPortIdentifier the user chose. **/
    //SerialEvent Mytest;
    //PortChooser MyPort = new PortChooser(null);
    SerialPortEventListener SEvent;
    InputStream inputStream;
    OutputStream outputStream;
    protected CommPortIdentifier selectedPortIdentifier;
    /** Creates new form MyComport */
    public MyComport(){
    initComponents();
    InitializeComponentValues();
    public void InitializeComponentValues(){
    // get list of ports available on this particular computer,
    // by calling static method in CommPortIdentifier.
    Enumeration pList = CommPortIdentifier.getPortIdentifiers();
    // Process the list, putting serial and parallel into ComboBoxes
    while (pList.hasMoreElements()) {
    CommPortIdentifier cpi = (CommPortIdentifier) pList.nextElement();
    System.out.println("Port " + cpi.getName());
    map.put(cpi.getName(), cpi);
    if (cpi.getPortType() == CommPortIdentifier.PORT_SERIAL) {
    comportCMB.addItem(cpi.getName());
    } else if (cpi.getPortType() == CommPortIdentifier.PORT_PARALLEL) {
    //parallelPortsChoice.setEnabled(true);
    //parallelPortsChoice.addItem(cpi.getName());
    } else {
    //other.addItem(cpi.getName());
    public void SerialPortEvent(SerialPortEvent SEvent){
    switch(SEvent.getEventType()){
    case SerialPortEvent.BI:
    case SerialPortEvent.CD:
    case SerialPortEvent.CTS:
    case SerialPortEvent.DSR:
    case SerialPortEvent.FE:
    case SerialPortEvent.OE:
    case SerialPortEvent.PE:
    case SerialPortEvent.RI:
    case SerialPortEvent.OUTPUT_BUFFER_EMPTY:
    break;
    case SerialPortEvent.DATA_AVAILABLE:
    StringBuffer readBuffer = new StringBuffer();
    System.out.println(readBuffer);
    /** 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();
    jLabel1 = new javax.swing.JLabel();
    comportCMB = new javax.swing.JComboBox();
    jLabel2 = new javax.swing.JLabel();
    baudCMB = new javax.swing.JComboBox();
    jLabel3 = new javax.swing.JLabel();
    databitsCMB = new javax.swing.JComboBox();
    jLabel4 = new javax.swing.JLabel();
    parityCMB = new javax.swing.JComboBox();
    jLabel5 = new javax.swing.JLabel();
    stopbitsCMB = new javax.swing.JComboBox();
    jLabel6 = new javax.swing.JLabel();
    flowconCMB = new javax.swing.JComboBox();
    connectBTN = new javax.swing.JButton();
    disconnectBTN = new javax.swing.JButton();
    jPanel2 = new javax.swing.JPanel();
    jPanel3 = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    receiveTBX = new javax.swing.JTextArea();
    jPanel4 = new javax.swing.JPanel();
    jScrollPane2 = new javax.swing.JScrollPane();
    sendTBX = new javax.swing.JTextArea();
    sendBTN = new javax.swing.JButton();
    menuBar = new javax.swing.JMenuBar();
    fileMenu = new javax.swing.JMenu();
    openMenuItem = new javax.swing.JMenuItem();
    saveMenuItem = new javax.swing.JMenuItem();
    saveAsMenuItem = new javax.swing.JMenuItem();
    exitMenuItem = new javax.swing.JMenuItem();
    editMenu = new javax.swing.JMenu();
    cutMenuItem = new javax.swing.JMenuItem();
    copyMenuItem = new javax.swing.JMenuItem();
    pasteMenuItem = new javax.swing.JMenuItem();
    deleteMenuItem = new javax.swing.JMenuItem();
    helpMenu = new javax.swing.JMenu();
    contentsMenuItem = new javax.swing.JMenuItem();
    aboutMenuItem = new javax.swing.JMenuItem();
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("Serial Port");
    setMinimumSize(new java.awt.Dimension(552, 351));
    jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Serial Port Configuration", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 12)));
    jLabel1.setFont(new java.awt.Font("Verdana", 0, 11));
    jLabel1.setText("Connect Using :");
    comportCMB.setFont(new java.awt.Font("Verdana", 0, 11));
    jLabel2.setFont(new java.awt.Font("Verdana", 0, 11));
    jLabel2.setText("Bits Per Second :");
    baudCMB.setFont(new java.awt.Font("Verdana", 0, 11));
    baudCMB.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "110", "300", "1200", "2400", "4800", "9600", "19200", "38400", "57600", "115200", "230400", "460800", "921600" }));
    jLabel3.setFont(new java.awt.Font("Verdana", 0, 11));
    jLabel3.setText("Data Bits :");
    databitsCMB.setFont(new java.awt.Font("Verdana", 0, 11));
    databitsCMB.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "5", "6", "7", "8" }));
    jLabel4.setFont(new java.awt.Font("Verdana", 0, 11));
    jLabel4.setText("Parity :");
    parityCMB.setFont(new java.awt.Font("Verdana", 0, 11));
    parityCMB.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Even", "Odd", "None", "Mark", "Space" }));
    jLabel5.setFont(new java.awt.Font("Verdana", 0, 11));
    jLabel5.setText("Stop Bits :");
    stopbitsCMB.setFont(new java.awt.Font("Verdana", 0, 11));
    stopbitsCMB.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1", "1.5", "2" }));
    jLabel6.setFont(new java.awt.Font("Verdana", 0, 11));
    jLabel6.setText("Flow Control :");
    flowconCMB.setFont(new java.awt.Font("Verdana", 0, 11));
    flowconCMB.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Xon/Xoff In", "Xon/Xoff Out", "RTS/CTS In", "RTS/CTS Out", "None" }));
    connectBTN.setFont(new java.awt.Font("Verdana", 0, 11));
    connectBTN.setLabel("Connect");
    connectBTN.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    connectBTNActionPerformed(evt);
    disconnectBTN.setFont(new java.awt.Font("Verdana", 0, 11));
    disconnectBTN.setLabel("Disconnect");
    disconnectBTN.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    disconnectBTNActionPerformed(evt);
    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
    jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel1Layout.createSequentialGroup()
    .addContainerGap()
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(jLabel1)
    .addComponent(jLabel2)
    .addComponent(jLabel3)
    .addComponent(jLabel4)
    .addComponent(jLabel5)
    .addComponent(jLabel6))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
    .addComponent(disconnectBTN, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addComponent(flowconCMB, javax.swing.GroupLayout.Alignment.TRAILING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addComponent(stopbitsCMB, javax.swing.GroupLayout.Alignment.TRAILING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addComponent(parityCMB, javax.swing.GroupLayout.Alignment.TRAILING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addComponent(databitsCMB, javax.swing.GroupLayout.Alignment.TRAILING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addComponent(baudCMB, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addComponent(comportCMB, 0, 86, Short.MAX_VALUE)
    .addComponent(connectBTN, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    jPanel1Layout.setVerticalGroup(
    jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel1Layout.createSequentialGroup()
    .addContainerGap(19, Short.MAX_VALUE)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(comportCMB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(jLabel1))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(baudCMB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(jLabel2))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(databitsCMB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(jLabel3))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(parityCMB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(jLabel4))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(stopbitsCMB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(jLabel5))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(flowconCMB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(jLabel6))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(connectBTN)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(disconnectBTN))
    jLabel1.getAccessibleContext().setAccessibleName("");
    jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Data Communication", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 12)));
    jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Receive Data", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 0, 12)));
    receiveTBX.setColumns(20);
    receiveTBX.setRows(5);
    jScrollPane1.setViewportView(receiveTBX);
    javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(
    jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel3Layout.createSequentialGroup()
    .addContainerGap()
    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 214, Short.MAX_VALUE)
    .addContainerGap())
    jPanel3Layout.setVerticalGroup(
    jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel3Layout.createSequentialGroup()
    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 63, Short.MAX_VALUE)
    .addContainerGap())
    jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Send Data", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 0, 12)));
    sendTBX.setColumns(20);
    sendTBX.setRows(5);
    jScrollPane2.setViewportView(sendTBX);
    sendBTN.setLabel("Send");
    javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
    jPanel4.setLayout(jPanel4Layout);
    jPanel4Layout.setHorizontalGroup(
    jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel4Layout.createSequentialGroup()
    .addContainerGap()
    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 214, Short.MAX_VALUE)
    .addComponent(sendBTN, javax.swing.GroupLayout.Alignment.TRAILING))
    .addContainerGap())
    jPanel4Layout.setVerticalGroup(
    jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel4Layout.createSequentialGroup()
    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(sendBTN))
    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(jPanel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addComponent(jPanel4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    .addContainerGap())
    jPanel2Layout.setVerticalGroup(
    jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
    .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
    fileMenu.setText("File");
    openMenuItem.setText("Open");
    fileMenu.add(openMenuItem);
    saveMenuItem.setText("Save");
    fileMenu.add(saveMenuItem);
    saveAsMenuItem.setText("Save As ...");
    fileMenu.add(saveAsMenuItem);
    exitMenuItem.setText("Exit");
    exitMenuItem.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    exitMenuItemActionPerformed(evt);
    fileMenu.add(exitMenuItem);
    menuBar.add(fileMenu);
    editMenu.setText("Edit");
    cutMenuItem.setText("Cut");
    editMenu.add(cutMenuItem);
    copyMenuItem.setText("Copy");
    editMenu.add(copyMenuItem);
    pasteMenuItem.setText("Paste");
    editMenu.add(pasteMenuItem);
    deleteMenuItem.setText("Delete");
    editMenu.add(deleteMenuItem);
    menuBar.add(editMenu);
    helpMenu.setText("Help");
    contentsMenuItem.setText("Contents");
    helpMenu.add(contentsMenuItem);
    aboutMenuItem.setText("About");
    helpMenu.add(aboutMenuItem);
    menuBar.add(helpMenu);
    setJMenuBar(menuBar);
    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
    .addContainerGap()
    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addGap(18, 18, 18)
    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addContainerGap())
    layout.setVerticalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addContainerGap()
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
    .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    pack();
    }// </editor-fold>
    private void exitMenuItemActionPerformed(java.awt.event.ActionEvent evt) {                                            
    System.exit(0);
    private void connectBTNActionPerformed(java.awt.event.ActionEvent evt) {                                          
    // TODO add your handling code here:
    // Get the CommPortIdentifier.
    thePortID = getSelectedIdentifier();
    System.out.println("Trying to open " + thePortID.getName() + "...");
    try{
    thePort = thePortID.open("DarwinSys DataComm", TIMEOUTSECONDS * 1000);
    SerialPort myPort = (SerialPort) thePort;
    SEvent = (SerialPortEventListener) thePort;
    //SEvent.serialEvent();
    myPort.setSerialPortParams(getBaud(), getDataBits(), getStopBits(), getParity());
    myPort.getFlowControlMode();
    myPort.notifyOnDataAvailable(true);
    myPort.addEventListener(this);
    inputStream = myPort.getInputStream();
    } catch (TooManyListenersException ex) {
    Logger.getLogger(MyComport.class.getName()).log(Level.SEVERE, null, ex);
    } catch (IOException ex) {
    Logger.getLogger(MyComport.class.getName()).log(Level.SEVERE, null, ex);
    } catch (UnsupportedCommOperationException ex) {
    Logger.getLogger(MyComport.class.getName()).log(Level.SEVERE, null, ex);
    } catch (PortInUseException ex) {
    Logger.getLogger(MyComport.class.getName()).log(Level.SEVERE, null, ex);
    } //catch(TooManyListenersException e) {}
    System.out.println("Trying to open with BAUD " + getBaud());
    System.out.println("Trying to open with DataBits " + getDataBits());
    System.out.println("Trying to open with Parity " + getParity());
    System.out.println("Trying to open with StopBits " + getStopBits());
    System.out.println("Trying to open with FlowControl " + getFlowControlMode());
    /* The public "getter" to retrieve the selection by CommPortIdentifier. */
    public CommPortIdentifier getSelectedIdentifier() {
    selectedPortName = (String) comportCMB.getSelectedItem();
    // Get the given CommPortIdentifier
    selectedPortIdentifier = (CommPortIdentifier)map.get(selectedPortName);
    return selectedPortIdentifier;
    private void disconnectBTNActionPerformed(java.awt.event.ActionEvent evt) {                                             
    // TODO add your handling code here:
    thePortID = getSelectedIdentifier();
    thePort.close();
    System.out.println("Closed " + thePortID.getName() + "...");
    public int getBaud(){
    int baud;
    baud = Integer.parseInt((String) baudCMB.getSelectedItem()) ;
    return baud;
    public int getDataBits(){
    int databits;
    databits = Integer.parseInt((String) databitsCMB.getSelectedItem());
    return databits;
    public int getParity(){
    String parity;
    parity = (String) parityCMB.getSelectedItem();
    if(parity.equals("Even"))
    return SerialPort.PARITY_EVEN;
    else if(parity.equals("Odd"))
    return SerialPort.PARITY_ODD;
    else if(parity.equals("Mark"))
    return SerialPort.PARITY_MARK;
    else if (parity.equals("Space"))
    return SerialPort.PARITY_SPACE;
    else
    return SerialPort.PARITY_NONE;
    public int getStopBits(){
    String stopbits;
    stopbits = (String) stopbitsCMB.getSelectedItem();
    if(stopbits.equals("1"))
    return SerialPort.STOPBITS_1;
    else if(stopbits.equals("1.5"))
    return SerialPort.STOPBITS_1_5;
    else
    return SerialPort.STOPBITS_2;
    public int getFlowControlMode(){
    String flowcontrol;
    flowcontrol = (String)flowconCMB.getSelectedItem();
    if(flowcontrol.equals("Xon/Xoff In"))
    return SerialPort.FLOWCONTROL_XONXOFF_IN;
    else if(flowcontrol.equals("Xon/Xoff Out"))
    return SerialPort.FLOWCONTROL_XONXOFF_OUT;
    else if(flowcontrol.equals("RTS/CTS In"))
    return SerialPort.FLOWCONTROL_RTSCTS_IN;
    else if(flowcontrol.equals("RTS/CTS Out"))
    return SerialPort.FLOWCONTROL_RTSCTS_OUT;
    else
    return SerialPort.FLOWCONTROL_NONE;
    * @param args the command line arguments
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new MyComport().setVisible(true);
    // Variables declaration - do not modify
    private javax.swing.JMenuItem aboutMenuItem;
    private javax.swing.JComboBox baudCMB;
    public javax.swing.JComboBox comportCMB;
    private javax.swing.JButton connectBTN;
    private javax.swing.JMenuItem contentsMenuItem;
    private javax.swing.JMenuItem copyMenuItem;
    private javax.swing.JMenuItem cutMenuItem;
    private javax.swing.JComboBox databitsCMB;
    private javax.swing.JMenuItem deleteMenuItem;
    private javax.swing.JButton disconnectBTN;
    private javax.swing.JMenu editMenu;
    private javax.swing.JMenuItem exitMenuItem;
    private javax.swing.JMenu fileMenu;
    private javax.swing.JComboBox flowconCMB;
    private javax.swing.JMenu helpMenu;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JMenuBar menuBar;
    private javax.swing.JMenuItem openMenuItem;
    private javax.swing.JComboBox parityCMB;
    private javax.swing.JMenuItem pasteMenuItem;
    private javax.swing.JTextArea receiveTBX;
    private javax.swing.JMenuItem saveAsMenuItem;
    private javax.swing.JMenuItem saveMenuItem;
    private javax.swing.JButton sendBTN;
    private javax.swing.JTextArea sendTBX;
    private javax.swing.JComboBox stopbitsCMB;
    // End of variables declaration
    }

    Thank you, for your kind reply......
    I tried for plain java coding, it is worling fine.
    It is receiving data on events from my harware.
    But problem while I implement SerialPorteventHandler.
    I am working on Netbeans 6.0.1
    MyCODE : -------
    class MyComport extends javax.swing.JFrame implements SerialPortEventListener{
              // My CODE
    }This give error like.....
    readserialport.MyComport is not abstract and does not override abstract method serialEvent(javax.comm.SerialPortEvent) in javax.comm.SerialPortEventListener
    If I remove this SerialPortEventListener then it doesn't allow me to add event listener.....
    myport.addeventlistner(this);I tried to solve this problem other way, but failed...
    Please help me to sola this problem....

  • Creating a GUI in netbeans

    If anyone can help it would be so GREAT! I am trying to create a GUI, which can import two programs off my desktop into two frames on the GUI. If possible does anyone knows how to do it?
    Basically my GUI is used in terface and see two differnt prograsm at once. One program is a video feeder, and the other program is a sensor reading software. the GUI is for a senior design project, whre we can operate a remote control car, see wheres its going through the video feed program and collect sensor readings.

    Nothing is impossible.. just possibly more complicated than it's worth.
    Are the two programs java programs by any chance? Do you have access to the source, and you're just trying to create a combination of the two? Or are they completely independent, non-java programs?
    Either way, I'd say it's probably going to require more work than creating a GUI in netbeans. Maybe if you listed exactly what the two programs are, somebody would know a way to link them with java?
    Edited by: kevinaworkman on Apr 7, 2009 7:33 PM

  • Error while test applet with jcwde simulator using netbeans

    i make applet using netbeans 6.5.. i have compile class and i get no error and results *.class but while I use netbeans service on Javacard simulator.. while I try to connect with entry aid applet i have an error.
    this is error log
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    + +
    + Cannot connect to simulator. Cause: Exception during creating JavaCardSimulatorAdapter +
    + +
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    why this error is happened ?
    thank for your attention.. :D
    By Roni
    Edited by: ronized on Apr 18, 2009 6:35 AM

    Hi,
    As per this part of the trace:
    Exception in SAP Application Integrator occured: Application URL &\#39;:///sap(ZT1KVXBWektldldTeV9QQXBXRjNaWTRBLS1OZmRvZzBRWWY2QmN0WThNUmgqdUlRLS0=)/bc/gui/sap/its/webgui&\#39; is not valid! Please check the protocol and host entries for system &\#39;sapdev&\#39;. at ...
    You can clearly see that the system object 'sapdev' is not configured correctly/at all - you are trying to launch transaction iView
    (WEBGUI) and in order to do so you should configure the 'internet transaction server' category of the system  object
    with the hostname of the ITS server.
    Generally the template is
    <System.Access.ITS.protocol>://<System.Access.ITS.hostname>/sap<ESID>/bc/gui/sap/its/webgui?\....
    So that's why you got
    Please check the protocol and host entries for system ..

  • Serious problems on GUI with NetBeans.....

    package supershare;
    import java.awt.event.*;
    import javax.swing.*;
    public class testGUI extends javax.swing.JFrame implements java.awt.event.ActionListener{
        public testGUI(){initComponents();}
    public void initComponents(){/*Generated Code*/}
    public static void main(String args[]) {
                    new testGUI().setVisible(true);
      public void actionPerformed(ActionEvent e)
            /*JProgressBar jp = new JProgressBar(0, 100);
            jp.setValue(0);
            jp.setStringPainted(true);
            this.add(jp);
            this.validate();*/
            this.remove(jButton1);
        // Variables declaration - do not modify
        private javax.swing.JButton jButton1;
        // End of variables declaration
    }Above is the code I made under NetBeans....
    As you know, NetBeans has a function called "JFrameForm", which allows you to design GUI more conviniently....
    if you are familar with NetBeans, you can easily understand the above code...
    You know what I am trying to do is that when I click the button, the button should disappear, but it doesnot....
    please help here... actually, I have a bigger project meeting this problem.. and if I have to design the whole project without using NetBeans's JFrameForm function, it will be a nightmare...yes, lots of work...
    Apreciate any help
    thanks

    Has any one here used NetBeans before???
    It has nothing to do with netbeans (except the layout manager you used happens to come with it)
    You need to understand what you are doing in terms of LayoutManagers and Containers. You cannot just add a Component to a Container with anything but the simplest layout manager - you need to understand the constraints the manager uses. In this case, I designed my JFrame using the Netbeans designer (which is most cool I must say) and added a JPanel to act as an area to add and remove components from (so I don't have to understand the GroupLayout constraints).
    Be forewarned that GroupLayout is not (as of yet) part of the standard jdk and you may have issues trying to distribute your application or run it outside of netbeans unless you know what you are doing or netbeans does it for you (I haven't tried yet)
    Good luck
    import java.awt.BorderLayout;
    import javax.swing.JProgressBar;
    * @author  Ian Schneider
    public class NewJFrame extends javax.swing.JFrame {
        /** Creates new form NewJFrame */
        public NewJFrame() {
            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() {
            jButton1 = new javax.swing.JButton();
            jPanel1 = new javax.swing.JPanel();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            jButton1.setText("Press Me");
            jButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton1ActionPerformed(evt);
            jPanel1.setLayout(new java.awt.BorderLayout());
            jPanel1.setName("progressArea");
            org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
                    .addContainerGap()
                    .add(jButton1)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 281, Short.MAX_VALUE)
                    .addContainerGap())
            layout.setVerticalGroup(
                layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
                    .addContainerGap()
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
                        .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel1, 0, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .add(jButton1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            pack();
        // </editor-fold>
        private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
            final JProgressBar jpb = new JProgressBar(0,100);
            jPanel1.add(jpb,BorderLayout.CENTER);
            jPanel1.validate();
            jPanel1.repaint();
            Runnable task = new Runnable() {
                public void run() {
                    jButton1.setEnabled(false);
                    for (int i = 0; i < 100; i++) {
                        jpb.setValue(i);
                        try {
                            Thread.sleep(50);
                        } catch (InterruptedException ie) {}
                    jButton1.setEnabled(true);
                    jPanel1.remove(jpb);
                    jPanel1.validate();
                    jPanel1.repaint();
            new Thread(task).start();
         * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new NewJFrame().setVisible(true);
        // Variables declaration - do not modify
        private javax.swing.JButton jButton1;
        private javax.swing.JPanel jPanel1;
        // End of variables declaration
    }

  • Problem with JFileChooser when run using Netbeans

    I just want to state that I have NO problem writing the code that brings up this component. My problem is what happens when the JFileChooser component is loaded. My environment is Windows Vista, Java SE 1.6.0. -> Netbeans IDE 5.0. The code I use is as follows:
    public RegexParser()
    JFileChooser openfile = new JFileChooser();
    openfile.showOpenDialog(RegexParser.this);
    int returnVal = openfile.showOpenDialog(RegexParser.this);
    if (returnVal == JFileChooser.APPROVE_OPTION)
    //This code gets the path of the file and uses as a parameter to parse data.
    filename = openfile.getSelectedFile().getPath();
    openfile.setVisible(false);
    ParseData(filename);
    The problem is when I try to select an option from the combobox labeled "Look In:" Every directory I select which is not the root of the drive will display NO FILES even though there are files in that directory.
    Notice: I have also run the same code using the cmd.exe and it works fine. I have also looked at: http://java.sun.com/docs/books/tutorial/uiswing/components/filechooser.html but have found nothing that has helped me.
    Can someone explain what is the problem? Is this a known bug in Netbeans? Is there any code that can be used as a workaround?

    Yes I copied the code to my machine and run it. The example program had problems when I executed using netbeans it had the problem.
    When I executed using Command Prompt there where no problems.

  • Web Service tutorial using NetBeans 5.5 fails on OS X Tiger

    I have tried doing this tutorial using NetBeans 5.5 with the Enterprise Pack and Visual Web extensions installed. I am able to get it to run fine on my WinXP machine configured with the same NetBeans 5.5 stuff as the Mac. I have tried it several times always with the same result. Any insight that you can provide will be greatly appreciated.
    The tutorial is located: http://www.netbeans.org/kb/55/websvc-jax-ws.html
    Below is what is being returned in the Output window upon Run:
    init:
    deps-module-jar:
    deps-ear-jar:
    deps-jar:
    Created dir: /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/classes
    Created dir: /Users/bob/Programming/CalculatorWSApplication/build/web/META-INF
    Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/META-INF
    Copying 4 files to /Users/bob/Programming/CalculatorWSApplication/build/web
    library-inclusion-in-archive:
    Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
    Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
    Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
    Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
    Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
    Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
    Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
    Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
    Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
    Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
    Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
    Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
    Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
    Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
    Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
    library-inclusion-in-manifest:
    Compiling 1 source file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/classes
    wsgen-init-nonJSR109:
    Created dir: /Users/bob/Programming/CalculatorWSApplication/build/generated/wsgen/service
    wsgen-CalculatorWS-nonJSR109:
    Problem encountered during annotation processing;
    see stacktrace below for more information.
    java.lang.NoSuchMethodError: com.sun.codemodel.JCodeModel._class(Ljava/lang/String;Lcom/sun/codemodel/ClassType;)Lcom/sun/codemodel/JDefinedClass;
    at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.getCMClass(WebServiceWrapperGenerator.java:446)
    at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.generateWrappers(WebServiceWrapperGenerator.java:256)
    at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.processMethod(WebServiceWrapperGenerator.java:141)
    at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.visitMethodDeclaration(WebServiceVisitor.java:468)
    at com.sun.tools.apt.mirror.declaration.MethodDeclarationImpl.accept(MethodDeclarationImpl.java:41)
    at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.processMethods(WebServiceVisitor.java:406)
    at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.postProcessWebService(WebServiceVisitor.java:361)
    at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.postProcessWebService(WebServiceWrapperGenerator.java:115)
    at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.visitClassDeclaration(WebServiceVisitor.java:167)
    at com.sun.tools.apt.mirror.declaration.ClassDeclarationImpl.accept(ClassDeclarationImpl.java:95)
    at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.buildModel(WebServiceAP.java:345)
    at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.process(WebServiceAP.java:230)
    at com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.process(AnnotationProcessors.java:60)
    at com.sun.tools.apt.comp.Apt.main(Apt.java:454)
    at com.sun.tools.apt.main.JavaCompiler.compile(JavaCompiler.java:448)
    at com.sun.tools.apt.main.Main.compile(Main.java:1075)
    at com.sun.tools.apt.main.Main.compile(Main.java:938)
    at com.sun.tools.apt.Main.processing(Main.java:95)
    at com.sun.tools.apt.Main.process(Main.java:85)
    at com.sun.tools.apt.Main.process(Main.java:67)
    at com.sun.tools.ws.wscompile.CompileTool.buildModel(CompileTool.java:603)
    at com.sun.tools.ws.wscompile.CompileTool.run(CompileTool.java:536)
    at com.sun.tools.ws.util.ToolBase.run(ToolBase.java:54)
    at com.sun.tools.ws.ant.WsGen.execute(WsGen.java:457)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    at org.apache.tools.ant.Task.perform(Task.java:364)
    at org.apache.tools.ant.Target.execute(Target.java:341)
    at org.apache.tools.ant.Target.performTasks(Target.java:369)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
    at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:240)
    at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:293)
    at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:131)
    error: compilation failed, errors should have been reported
    wsgen-generate-nonJSR109:
    compile:
    compile-jsps:
    Created dir: /Users/bob/Programming/CalculatorWSApplication/dist
    Building jar: /Users/bob/Programming/CalculatorWSApplication/dist/CalculatorWSApplication.war
    do-dist:
    dist:
    Incrementally deploying http://localhost:8084/CalculatorWSApplication
    Completed incremental distribution of http://localhost:8084/CalculatorWSApplication
    Incrementally redeploying http://localhost:8084/CalculatorWSApplication
    deploy?config=file:/tmp/context18085.xml&path=/CalculatorWSApplication
    OK - Deployed application at context path /CalculatorWSApplication
    run-deploy:
    Browsing: http://localhost:8084/CalculatorWSApplication/CalculatorWS?Tester
    run-display-browser:
    run:
    BUILD SUCCESSFUL (total time: 1 second)

    This problem gets solved if you do NOT provide the Java path to the installer.
    e.g.
    if you have Java in /usr//bin/java
    make sure your PATH does not have /usr/bin....
    so basically which java throw error....Then provide the JRE PATH in oraparam.ini for the installer to start ...
    Give it a try...
    Karurkar

  • How to include external .js file into .ear file using NetBean 5.5.1?

    is it possible to include external .js file into .ear file using NetBean 5.5.1? if not, then where should I placed the external .js file and how to write the src="xxx" element? (that is , how to write the path of "xxx"?)
    I am using JBOSS 4.2.2 GA as server
    thx!!

    Even this is also not possible because, the code in that package is developed by DWR and i am just adding it to my lib folder and importing the respective classes. In the same manner i need to include the *.js* file in the JSP.It took me about 3 minutes reading through the [DWR Getting Started|http://getahead.org/dwr/getstarted] page to learn that you don't have to do any of that. Perhaps you should read that page?

  • Creating mysql schema from pojo with hibernate using netbeans

    I have been fortunate in finding some good tutorials on how to create POJOs from database schema using hibernate (e.g. http://netbeans.org/kb/docs/web/hibernate-webapp.html).
    Does anyone know of tutorials on creating database schemas from POJOs -- preferable using netbeans? Even the very smallest tutorial with one table or two related tables will do.

    961389 wrote:
    I have been fortunateNot really, that is not rare information.
    Does anyone know of tutorials on creating database schemas from POJOs -- preferable using netbeans? Even the very smallest tutorial with one table or two related tables will do.Netbeans has little to do with the creation of the schema, it's the container that's usually configured to do it. You can use the "hibernate.hbm2ddl.auto" property to control whether the DDL is created from the entities automatically.

Maybe you are looking for

  • Creating an Emergency Boot CD for tiger for use on a powerbook

    Hi need to create the cd or dvd, i understand bootcd and carbon copy cloner work, but CCC does not work as i only have once hard drive, bootcd is incompatible with tiger so what do i use as i want to put diskwarrior on an emergency cd or dvd and teec

  • Performance tuning in oracle 10g

    Hi Guys i hope all are well,Have a nice day Today i have discuss with some performance tuning issue recently , i joined the new project that project improve the efficiency of the applicaton. in this environment oracle plsql langauage are used , so if

  • Getting the file type from a placed file

    Hi I am trying to get the file type from items placed on a page. I know the types available has one of the three interfaces "IImageAttributes", "IEPSAttributes" or "IPDFAttributes", but how can i test whether the placed image is a TIF, JPG ... Of cou

  • Custom variables for reporting

    Hello, I have a customer who has UCCX 8.5 and was wondering if they can do the following. Call comes in, agent answers the call and when the call is complete, they would like the agent to add an "account code" to the call from within CAD. They then w

  • Sales tax data in the posting term is not consistent (Real Estate Contract)

    Hi  Experts , getting the following error in while creating a "Rental Contract" through the T. Code RECN while trying to enter data in the " Conditions" tab page of the contract . Have made all the entries in in the Posting Parameters tab ( e.g. Paym