SwingWorker and NetBeans IDE

I use NetBeans IDE 7 to make GUI. I wonder if there is a way to let the NetBeans IDE 7 dealing with the construction of management background since JProgressBar and jTextArea does not at all. I have set jProgressArea value and jTextArea text manually - I believe that they must be fixed by SwingWorker (or is there any alternative?) to do their job properly. So my question is: can I do this using the view Design of NetBeans IDE? I don't see this option.
public class JFrame extends javax.swing.JFrame {

    public JFrame() {
        initComponents();
    }

    private void initComponents() {

        jButton1 = new javax.swing.JButton();
        jProgressBar1 = new javax.swing.JProgressBar();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTextArea1 = new javax.swing.JTextArea();
        jButton1.setText("START DOWNLOADING XLS FILES");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });
        jTextArea1.setColumns(20);
        jTextArea1.setEditable(false);
        jTextArea1.setFont(new java.awt.Font("Tahoma", 0, 11));
        jTextArea1.setRows(5);
        jScrollPane1.setViewportView(jTextArea1);
    }

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
        try {
            new JFrame().callPowerSystemInformationGetFunctions();
        } catch (MalformedURLException ex) {
            Logger.getLogger(JFrame.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    private void callPowerSystemInformationGetFunctions() throws MalformedURLException {
          getCrossborderPowerFlows();
        jProgressBar1.setValue(50);
          getCrossborderTransmissionCapacity();
        jProgressBar1.setValue(100);
     }
     
     private void getCrossborderPowerFlows() throws MalformedURLException {
          jTextArea1.append("Executing getCrossborderPowerFlows!"+System.getProperty("line.separator"));
          /*implementation*/
          jTextArea1.append("Exiting getCrossborderPowerFlows!"+System.getProperty("line.separator"));
     }
     
     private void getCrossborderTransmissionCapacity() throws MalformedURLException {
          jTextArea1.append("Executing getCrossborderTransmissionCapacity!"+System.getProperty("line.separator"));
          /*implementation*/
          jTextArea1.append("Exiting getCrossborderTransmissionCapacity!"+System.getProperty("line.separator"));
     }
    
    public static void main(String args[]) {
        try
        { javax.swing.UIManager.setLookAndFeel( javax.swing.UIManager.getSystemLookAndFeelClassName() ); }        
          catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(JFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(JFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(JFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(JFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }

        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new JFrame().setVisible(true);
            }
        });
    }
 
    private javax.swing.JButton jButton1;
    private javax.swing.JProgressBar jProgressBar1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTextArea jTextArea1;
}

totalnewby wrote:
So my question is: can I do this using the view Design of NetBeans IDE? I don't see this option.

No, the fashion design can do for you, so no doubt you need to write code, as already suggested by Jörg.

Tags: Java

Similar Questions

  • Samples of the RIM in NetBeans IDE

    Hello

    I want to know how to import samples of RIM in NetBeans IDE

    I m using NetBeans IDE 6.5 and have implemented a single what path is defined on RIM

    so I can use NetBeans IDE to develop app RIM

    but want to compile and run the examples of RIM of NetBeans

    How can I do this?

    As much as I know there not netbeans plugin like eclipse plugin JDE.

    There is therefore no import mechanism.

    The only way - create netbeans projects and the transfer of the source of samples of the RIM and project files in folders of NB project.

  • NetBeans IDE 8 Edition version works in this course?

    Can you install NetBeans 8 version edition for this course, or we must always use the beta version?

    Any update of documentation using NetBeans IDE 8 in this MOOC Embedded Java?

    Thank you very much.

    Matthew Ho

    Hi Matthew -.

    Yes, we'll use NetBeans 8 (the current version) and Java SE 8 (JDK 1.8.0).

    Please do not use NetBeans 8 beta - the beta version is missing a few items needed for Java ME embedded 8.

    Materials in 1 week will cover installation of NetBeans, the plugins and Java ME SDK, as well as the Raspberry Pi for Java ME 8 Embedded configuration.

    Just a few more days!

    Tom

  • Derby in Netbeans IDE database connectivity problem

    I use the latest version of Netbeans IDE
    I've already put the variable JAVA_HOME and DERBY_HOME, as well as path variables.
    I am trying to connect to the database in network Mode
    by using the following code

    ......
    Try
    {
    Class.forName ("org.apache.derby.jdbc.ClientDriver");
    }
    catch (ClassNotFoundException System.Exception)
    {
    exception.printStackTrace ();
    }
    .....

    but it gives the error of execution that "failed to load the driver.
    Please help me get through this

    Try adding the following to your class:

    Import org.apache.derby.jdbc.ClientDriver;

    If he produces an error, your pilot *.jar file is not in the classpath.

  • Is is possible to connect Netbean IDE to the Oracle XE database.

    Is possible to connect Netbean IDE to the Oracle XE database uses drivers provided with Netbean network.

    I m giving continuation of input to Netbean parameter.

    Data entry mode: entry field
    Driver name: JAVA DB (Network)
    Host: light-LMO
    Port: 1521
    Database: XE
    Username:lightweight
    Password: xxxxx


    When tried connecting the Oracle XE using netbean I got following error.


    ubable to add a connection. Could not establish a connection to the jdbc:derby://lightweight-ovm:1521 / XE
    using org.apache.derby.jdbc.ClientDriver (insufficient during the reading of the network - wait a minimum)
    6 bland and received only 1 byrtes. the connection has been lost.


    However, I can able to connect in the jsp pages using the following connection string.

    Class.forName ("oracle.jdbc.driver.OracleDriver");
    Conn = DriverManager.getConnection ("jdbc:oracle:thin:@localhost:1521:XE", "light", "oracle");


    What's not here?

    Please post this in

    Database connectivity - Java Database Connectivity (JDBC) Forums...

    http://forums.Sun.com/forum.jspa?forumid=48&start=0

    Concerning
    Rajesh

  • Error 404 on netbeans IDE 7.3

    Hi all

    I need help fixing error URL 'message 404 not found '. I use XAMPP and Netbeans environment. Everything is OK, but when I hit lance I get the 404 error message. Help, please. I use windows 7 - 64-bit operating system.

    Thank you

    LAMOS

    Hello

     

    The question you posted would be better suited in the TechNet Forums. I would recommend posting your query in the TechNet Forums.

    TechNet Forum

    http://social.technet.Microsoft.com/forums/en-us/w7itpronetworking/threads

     

    Hope this information helps.

  • Photography plan Cloud creative student and Teacher Edition (one year) and no idea of how to get and start using the programs?

    So I just brought the creative plan Cloud photography student and Teacher Edition (one year) and no idea of how to get and start using the programs?

    Hello

    Go to creative.adobe.com and you identify with your Adobe ID

    From there, you can download the applications you purchased.

    Normally, you are taken there immediately after the purchase.

  • Download of data and no idea where he's going.

    So I have a version of OS X running 10.11.2 2012 MacBook Air. He is constantly downloading data and I have no idea where he's going. An OS X update came in yesterday I think. This only happens when I connect to the wifi at home. Not just any other connection. Applications that downloading something that aren't fast running in the background. Please help me solve this problem

    You can monitor your wifi connection as below shows article.

    Use Wireless Diagnostics helps you troubleshoot Wi - Fi on your Mac - Apple Support

  • Pavilion 6500: I have a hp pavilion 6500 and no idea of what the admin password.

    I have a hp pavilion 6500 windows vista 64-bit and asked an administrator password to market. of course we have no idea what this could be so we're stuck. the stop code we get is 14713. I would greatly appreciate any help we can get to get on the laptop again.

    Try > kczygv

  • ORA-00904 during execution of the functions and procedures (IDE version 4.1.0.19)

    Recently, I updated my Oracle SQL Developer to the latest version (see below) and now when I try to run the function or procedure of the IDE, I had an alert with the error: "ORA-00904:"OBJECT_ID": invalid identifier." Code provider 904 ". Previous version of IDE works pretty well. What is the problem?

    Oracle SQL Developer 4.1.0.19

    Version 4.1.0.19

    Build a HAND - 19.07

    It seems that OBJECT_ID added to ALL_PROCEDURES for the 10g DB version, but after the version you have (10.2.0.1.0).  I don't have a link to the documentation specific to hand Oracle, but see the last comment by Steven Feuerstein in the next blog...

    PL/SQL challenge: ALL_PROCEDURES changes over version (5980)

    Typically when generation SQL for a particular version of the DB with SQL Developer, only major (10) and (more rarely) secondary numbers (2) gets checked, if your problem is one of those borderline cases that are easy to miss and less likely to get fixed. Whenever a customer has a specific need to use an older version, Oracle expects usually only the last set of patch (for example, 10.2.0.5) would be used.

  • How to call a pl/sql procedure to an event handler in NetBeans IDE

    I want to call a procedure from a button click event handler in NetBeans and also pass a parameter to the procedure. How I have here a this?

    Wrong forum!

    This question belonged to a NetBeans forum.

    Please mark the thread ANSWERED and repost in a forum for details.

    https://forums.NetBeans.org/

  • How to find discussions and old ideas?

    Yet the issues and ideas of the former Central client available? If so, how can I find those I got comment or followed?

    Hi Amy,

    Old Discussions/questions/ideas are still available for 'Read' access through support.eloqua.com.  Questions/discussions nominal upper created from the old CC have been assessed for accuracy and migrated to the new support portal as knowledge base articles.  The higher nominal idea was created as of the ideas in the transfer area of the idea of the new support portal.

    If you are looking for something specific on support.eloqua.com that you would like me to migrate in the knowledge base, feel free to send me a private message and get the URL.  I'll see if it's already there, and if not, I'll get it there for you.

    For ideas, you can re-create an idea in Exchange for our new idea if it is not already there.  Or, if you want - I can recreate for you if you shot me once again, the URL to the idea.

    Please feel free to friend me (use the link below) and PM me the questions/comments/concerns or the URL that you may have.

    I hope that helps!

    Mary Ann McKinnon

  • Questions about JavaFX, Swing, Touch and Netbeans

    Hi all. I'm trying to implement a touch support with JavaFX within a Netbeans application and met with a wall of problems.

    When running through JavaFX, everything works fine. Touch events are recorded and processed as expected. However, it seems that the JFXPanel who lives my scene in, or the Netbeans window system itself, interferes with key events.

    The Panel is multitouch. I mainly work with JavaFX obtaining buttons to work properly.

    • Committee will draw mouse down and mouse released event, but the event of mouse button is raised only AFTER the finger is removed from the Panel. In my mind, the mouse down event should pull your finger touches the Panel, as this event is triggered when you click with the mouse button otherwise. This of course could very well have nothing to do with Java, Swing or Netbeans, since it's the BONE that fires the original event.
    • The Panel goes off the pressed key, touch stationary and released touch events correctly, but these events are not detected with JavaFX in Netbeans/Swing.
    • The onAction event behaves the way the mouse pressed event. Tire only after removing your finger, not to touch.
    • If you move your finger (within the limits of the button) after a touching, onAction and the mouse goes off. But only if.

    Does anyone have experience with the creation of tactile support JavaFX in Netbeans framework?

    It is on 7u25, Win7 Enterprise Java.

    OK, so there's actually a windows control panel to change settings touch. Buried in a settings dialog box is the option to disable press it and hold for right-click fully function. This causes a mouse down event to be fired as planned on the button down.

    So, the solution is to disable the right click of press and hold Windows itself. Just enter 'touch' in the search box and you should see an option "Change touch input parameters" in the control panel.

  • Q:Java ME 3.4 SDK and Netbeans 7.4

    Hello

    7.4 Netbeans and Java ME SDK 3.4 will work together?

    Thank you

    Andy

    Yes. Just be sure to run NetBeans in Java 7 (not Java 6) 7.4.

    Best,

    -Terrence

  • UBUNTU 12.10 Cant install/configure Java ME for NetBeans IDE

    Im having problems correctly installing NetBeans 7.3, which is necessary to install Java ME... Currently, I have NetBeans installed 7.01 and I was told that I could install NetBeans 7.3 beside her and import plugins NB 7.01. Well I'm not having much luck with this. I tried the usual shortcuts with limited success... I was able to unzip the files... now I just neeed to make them available for NetBeans, so they can be added as a package. Don't know why im getting so much grief. Help, please! : D

    The only assistance you need here is to mark this question ANSWER and repost in a NetBeans forum.

    This forum is for questions for Oracle database only.

Maybe you are looking for