Updating a GUI component

Hello,
My application has an output window with a JTextArea as one of the components. This window is instantiated when the application starts up. What would be the best way to update the JTextArea component with the messages (status reports) generated by the other classes. What technique should I employ in this regard?
Thank You.

Here is my idea:
I do not think it is a good design to pass textArea to any components
that need to report the status message.
It is may-be better using proxy design.
Let's say, created a StatusManager class.
The status manager can have different constructors,
for example constructor with textarea as parameter,
or other constuctor with outputsteam as parameter ...etc.
And you pass the StatusManager to any components that needed to report the status message.
In this way, all components just use StatusManager's method to report the message,
and StatusManager can control the synchronized of message, the "output" of message
( to textarea or file ), and may-be also reformat the message.
In fact, have one layer between the source ( components report message ) and the real destination
( your textarea), it will become more flexible ( esay to change in the future) and esay to maintenance.
If you like this idea, you can even make more generic, like create your own listener interface,
any component (the destination part) can implement the listener and register to the StatusManager
in the way, you can even report to multi-destination.
Just my thought.

Similar Messages

  • Updating a GUI component from a runnable class that doesn't know that GUI

    Hi. I have a problem that I think isn't solvable in an elegant way, but I'd like to get confirmation before I do it the dirty way.
    My application allows the user to save (and load) his work in sessions files. I implemented this by a serializable class "Session" that basically stores all the information that the user created or the settings he made in its member variables.
    Now, I obviously want the session files created by this to be as small as possible and therefore I made sure that no GUI components are stored in this class.
    When the user has made all his settings, he can basically "run" his project, which may last for a long time (minutes, hours or days, depending on what the user wants to do....). Therefore I need to update the GUI with information on the progress/outcome of the running project. This is not just a matter of updating one single GUI component, but of a dynamic number of different internal frames and panels. So I'd need a reference to a GUI component that knows all these subcomponents to run a method that does the update work.
    How do I do that? I cannot pass the reference to that component through the method's argument that "runs" the project, because that needs to be a seperate thread, meaning that the method is just the run() method of that thread which has no arguments (which I cannot modify if I'm not mistaken).
    So the only thing I can think of is passing the reference through the constructor of the runnable class (which in turn must be stored in the session because it contains critical information on the user's work). As a result, all components that need to be incorporated in that updating process would be part of the session and go into the exported file, which is exactly what I wanted to avoid.
    I hope this description makes sense...
    Thanks in advance!

    Thanks for the quick answer! Though to be honest I am not sure how it relates to my question. Which is probably my fault rather than yours :-)
    But sometimes all it takes me to solve my problem is posting it to a forum and reading it through again :)
    Now I wrote a seperate class "Runner" that extends thread and has the gui components as members (passed through its constructor). I create and start() that object in the run method of the original runnable class (which isn't runnable anymore) so I can pass the gui component reference through that run method's argument.
    Not sure if this is elegant, but at least it allows me to avoid saving gui components to the session file :-)
    I am realizing that probably this post shouldn't have gone into the swing forum...

  • Thread wont update GUI component

    I'm developing an RMI application. I can't seem to get the gui components to show their value once their value has been set. I know the value has been set because i can retrieve it and print it out using System.out.println("Client status : " + lblYourStatus.getText());
    My thread gets called when there's a Property ChangeEvent, the code executes correctly but the gui component still doesn't show the correct value.
    Am i implementing the code for the thread incorrectly? or am i missing something else?
    Any help would be appreciated, this has been wrecking my head for a while now.
    private void jPanel1PropertyChange(java.beans.PropertyChangeEvent evt) {
    System.out.println("in propertyChange()");
    // lblYourStatus.setText(clientStatus);
    Thread t = new Thread(this);
    t.setDaemon(true);
    t.start();
    public void run()
    // while (true)
    try
    SwingUtilities.invokeLater(new Runnable()
    public void run()
    lblYourStatus.setText(clientStatus);
    System.out.println("Client status : " + lblYourStatus.getText());
    catch (Exception e)
    try
    Thread.sleep(1000);
    catch(Exception e) {}
    // } //end while
    }

    I don't think the RMI can affect it. It's the same for one client as it is for multiple clients. All the clients receive the correct values. I have been using System.out.println() statements to follow the program as it's been executing and everything seems to work as it should. I changed the code using the example you directed me to.
    It still receives all the correct values but when i set the label text the gui still doesn't show the text if i pass it in as a variable eg lblPlayer1Name.setText(m_player1Name), it still shows literal values eg lblPlayer1Name.setText( "test")
    I know the variable names contain valid values as i use System.out.println() statements to view them.
    any more ideas? thanks for your help so far.
        private void jPanel1PropertyChange(java.beans.PropertyChangeEvent evt) {
            Thread t = new Thread(this);
           // t.setDaemon(true);
            t.start();
        public void updateDetails(boolean gameInProgress, String status, String player1Name, String player2Name, int numSpectators)
            m_clientStatus = m_clientStatus + status;
            m_player1Name = player1Name;
            m_player2Name = player2Name;
            lblYourStatus.setText(m_clientStatus);       
            lblPlayer1Name.setText(m_player1Name);
            lblPlayer2Name.setText(m_player2Name);
        public void run()          
            //  SwingUtilities makes sure code is executed in the event thread.                                        
            SwingUtilities.invokeLater(new Runnable()                              
                public void run()                              
                    //this line wont print the value to the screen eventhough the next System.out.println() statement shows that the variable contains a valid string                              
                    lblPlayer1Name.setText(m_player1Name);     
                    System.out.println("Player 1 variable value: " + m_player1Name);
                    System.out.println("Player 1 label value: " + lblPlayer1Name.getText());
                    lblPlayer1Name.setText(lblPlayer1Name.getText());
                    //this line will print the literal string "Tom" to the label
                    lblPlayer1Name.setText("Tom");     
            // simulate log running task                              
          //  try { Thread.sleep(1000); }                         
          //  catch (Exception e) {}                    
            SwingUtilities.invokeLater(new Runnable()               
                public void run()                              
                    lblPlayer2Name.setText(m_player2Name);
                    System.out.println("Player 2 variable value: " + m_player2Name);
                    System.out.println("Player 2 label value: " + lblPlayer2Name.getText());
        }

  • What is the best way to get another object's method to update my GUI?

    package stuff;
    import java.awt.event.*;
    import javax.swing.*;
    import java.awt.*;
    public class Test extends JFrame{
      private static JButton ProcessButton = new JButton();
      private static JLabel jLabel2 = new JLabel();
      public static void main( String args []){
         Test f = new Test();
         f.setSize(500,500);
         Container c = f.getContentPane();
         ProcessButton.addActionListener( new ActionListener(){
                                     public void actionPerformed(ActionEvent e) {
                                        jLabel2.setText("Connecting to DB");
                                        //Connection connection = Tools.setUpConnectionToDB(url,userName,pwd);
         c.add(ProcessButton, BorderLayout.NORTH);
         jLabel2.setText("My Label");
         c.add(jLabel2, BorderLayout.SOUTH);
         f.setVisible(true);
    {\code]
    The method setUpConnectionToDB can take 1 - 10 mins to complete. By this time a user will prob have quit my app thinking
    it's crashed because it doesn't update the GUI with a progress status. :(
    What is the best way to get this method to update the GUI of the app which calls it?
    Something like  Connection connection = Tools.setUpConnectionToDB(url,userName,pwd, this);
    ie this being a reference to the GUI's JFrame is what I'm trying to use?

    A handy class to know about but not really what I'm after.
    I need the method call
    Tools.setUpConnectionToDB(url,userName,pwd);
    to be able to update a component ( The JLabel ) on the GUI
    Connection connection = Tools.setUpConnectionToDB(url,userName,pwd, this);
    [\code]
    method defn:public static Connection setUpConnectionToDB( String url, String user, String pwd, JFrame f ){
    //Why doesn't this code below modify the GUI on the calling App?
    f.jLabel2.setText("Setting UP DB Connection");
    f.repaint();
    Connection c = null;
    try{
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    c = DriverManager.getConnection(url,user,pwd);
    catch(ClassNotFoundException e){
    JOptionPane.showMessageDialog(null , "Error loading DB driver");
    System.exit(0);
    catch(Exception e){
    JOptionPane.showMessageDialog(null , "Error connecting to DB, check config file");
    System.exit(0);
    return c;
    }[\code]

  • A sort of KeyListener without a GUI Component?

    a sort of KeyListener without a GUI Component? ( or any trick that will do)?
    please be patient with my question
    I can't express myself very well but it's very important.
    Please help me I need an example how to implement
    a way to detect some combination of keystrokes in java without
    any GUI ( without AWT or Swing frames ...)
    just the console (DOS or Linux shell window) or with a minimzed
    java frame (awt or swing...) you know, MINIMIZED= not in focus.
    in other words if the user press ctrl + alt +shift ...or some
    other combination... ANYTIME ,and the java program is running in the
    background, is there a way to detect that,
    ... my problem if I use a frame (AWT or SWING) the windows must
    be in focus and NOT MINIMIZED..
    if I use
    someObject.addKeylistener(someComponent);
    then the "someComponent" must be in focus, am I right?
    What I'm coding is a program that if you highlight ANY text in
    ANY OS window, a java window (frame) should pop up and match the
    selected text in a dictionary file and brings me the meaning
    ( or a person's phone number , or
    a book author ...etc.)
    MY CHALLENGE IS WITHOUT PRESSING (Ctrl+C) to copy and paste
    ...etc. and WITHOUT MONITORING THE OS's CLIPBOARD ...I just want to
    have the feature that the user simply highlight a text in ANY
    window anywhere then press Ctrl+shift or some other combination,
    then MY JAVA PROGRAM IS TRIGGERED and it should EMULATE SOME
    KEYSTROKES OF Ctrl+C and then paste the clipboard
    somewhere in my program...with all that AUTOMATION BEING in the background.
    remember that my whole program ALL THE TIME MUST BE MINIMIZED AND
    NOT IN FOCUS
    or just running in the background (using javaw)..
    is there any trick ? pleeeeeeze!!!
    i'm not trying to write a sort of the spying so-called "key-logger"
    purely in java but it's a very similar challenge.
    please reply if you have questions
    I you could please answer me , then guys this would be very
    valuable technique that I need urgently. Thanks!

    DO NOT CROSS POST especially since this has nothing to do with game development at all. I can understand if it was in Java programming and New to Java but even then pick a forum and post it to that one and that one only.

  • Using my new GUI component in an applet :Help!!!

    I am seeking help for the following
    Define class MyColorChooser as a new component so it can be reused in other applications or applets. We want to use the new GUI component as part of an applet that displays the current Color value.
    The following is the code of MyColorChooser class
    * a) We define a class called MyColorChooser that provides three JSlider
    * objects and three JTextField objects. Each JSlider represents the values
    * from 0 to 255 for the red, green and blue parts of a color.
    * We use wred, green and blue values as the arguments to the Color contructeur
    * to create a new Color object.
    * We display the current value of each JSlider in the corresponding JTextField.
    * When the user changes the value of the JSlider, the JTextField(s) should be changed
    * accordingly as weel as the current color.
    * b)Define class MyColorChooser so it can be reused in other applications or applets.
    * Use your new GUI component as part of an applet that displays the current
    * Color value.
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.event.*;
    import java.text.DecimalFormat;
    public class MyChooserColor extends JFrame{
         private int red, green, blue;  // color shade for red, green and blue
         private static Color myColor;  // color resultant from red, green and blue shades
         private JSlider mySlider [];      
         private JTextField textField [];
    // Panels for sliders, textfields and button components
         private JPanel mySliderPanel, textFieldPanel, buttonPanel;
    // sublcass objet of JPanel for drawing purposes
         private CustomPanel myPanel;
         private JButton okButton, exitButton;
         public MyChooserColor ()     
              super( "HOME MADE COLOR COMPONENT; composition of RGB values " );
    //       setting properties of the mySlider array and registering the events
              mySlider = new JSlider [3];
              ChangeHandler handler = new ChangeHandler();
              for (int i = 0; i < mySlider.length; i++)
              {     mySlider[i] = new JSlider( SwingConstants.HORIZONTAL,
                               0, 255, 255 );
                   mySlider.setMajorTickSpacing( 10 );
                   mySlider[i].setPaintTicks( true );
    //      register events for mySlider[i]
                   mySlider[i].addChangeListener( handler);                     
    //      setting properties of the textField array           
              textField = new JTextField [3];          
              for (int i = 0; i < textField.length; i++)
              {     textField[i] = new JTextField("100.00%", 5 );
                   textField[i].setEditable(false);
                   textField[i].setBackground(Color.white);
    // initial Background color of each slider and foreground for each textfield
    // accordingly to its current color shade
              mySlider[0].setBackground(
                        new Color ( mySlider[0].getValue(), 0, 0 ) );
              textField[0].setForeground(
                        new Color ( mySlider[0].getValue(), 0, 0 ) );           
              mySlider[1].setBackground(
                        new Color ( 0, mySlider[1].getValue(), 0 ) );
              textField[1].setForeground(
                        new Color ( 0, mySlider[1].getValue(), 0 ) );
              mySlider[2].setBackground(
                        new Color ( 0, 0, mySlider[2].getValue() ) );
              textField[2].setForeground(
                        new Color ( 0, 0, mySlider[2].getValue() ) );
    // initialize myColor to white
              myColor = Color.WHITE;
    // instanciate myPanel for drawing purposes          
              myPanel = new CustomPanel();
              myPanel.setBackground(myColor);
    // instanciate okButton with its inanymous class
    // to handle its related events
              okButton = new JButton ("OK");
              okButton.setToolTipText("To confirm the current color");
              okButton.setMnemonic('o');
              okButton.addActionListener(
                   new ActionListener(){
                        public void actionPerformed (ActionEvent e)
                        {     // code permetting to transfer
                             // the current color to the parent
                             // component backgroung color
                             //System.exit( 0 );     
    //      instanciate exitButton with its inanymous class
    //      to handle its related events           
              exitButton = new JButton("Exit");
              exitButton.setToolTipText("Exit the application");
              exitButton.setMnemonic('x');
              exitButton.addActionListener(
                        new ActionListener(){
                             public void actionPerformed (ActionEvent e)
                             {     System.exit( 0 );     
    // define the contentPane
              Container c = getContentPane();
              c.setLayout( new BorderLayout() );
    //     panel as container for sliders
              mySliderPanel = new JPanel(new BorderLayout());
    //      panel as container for textFields           
              textFieldPanel = new JPanel(new FlowLayout());
    //      panel as container for Jbuttons components           
              buttonPanel = new JPanel ();
              buttonPanel.setLayout( new BoxLayout( buttonPanel, BoxLayout.Y_AXIS ) );
    //add the Jbutton components to buttonPanel           
              buttonPanel.add(okButton);
              buttonPanel.add(exitButton);
    //     add the mySlider components to mySliderPanel
              mySliderPanel.add(mySlider[0], BorderLayout.NORTH);
              mySliderPanel.add(mySlider[1], BorderLayout.CENTER);
              mySliderPanel.add(mySlider[2], BorderLayout.SOUTH);
    //add the textField components to textFieldPanel     
              for (int i = 0; i < textField.length; i++){
                   textFieldPanel.add(textField[i]);
    // add the panels to the container c          
              c.add( mySliderPanel, BorderLayout.NORTH );
              c.add( buttonPanel, BorderLayout.WEST);
              c.add( textFieldPanel, BorderLayout.SOUTH);
              c.add( myPanel, BorderLayout.CENTER );
              setSize(500, 300);          
              show();               
    //     inner class for mySlider events handling
         private class ChangeHandler implements ChangeListener {          
              public void stateChanged( ChangeEvent e )
    // start by collecting the current color shade
    // for red , forgreen and for blue               
                   setRedColor(mySlider[0].getValue());
                   setGreenColor(mySlider[1].getValue());
                   setBlueColor(mySlider[2].getValue());
    //The textcolor in myPanel (subclass of JPanel for drawing purposes)
                   myPanel.setMyTextColor( ( 255 - getRedColor() ),
                             ( 255 - getGreenColor() ), ( 255 - getBlueColor() ) );
    //call to repaint() occurs here
                   myPanel.setThumbSlider1( getRedColor() );
                   myPanel.setThumbSlider2( getGreenColor() );
                   myPanel.setThumbSlider3( getBlueColor() );
    // display color value in the textFields (%)
                   DecimalFormat twoDigits = new DecimalFormat ("0.00");
                   for (int i = 0; i < textField.length; i++){
                        textField[i].setText("" + twoDigits.format(
                                  100.0* mySlider[i].getValue()/255) + " %") ;
    // seting the textcolor for each textField
    // and the background color for each slider               
                   textField[0].setForeground(
                             new Color ( getRedColor(), 0, 0 ) );
                   mySlider[0].setBackground(
                             new Color ( getRedColor(), 0, 0) );
                   textField[1].setForeground(
                             new Color ( 0, getGreenColor() , 0 ) );
                   mySlider[1].setBackground(
                             new Color ( 0, getGreenColor(), 0) );
                   textField[2].setForeground(
                             new Color ( 0, 0, getBlueColor() ) );
                   mySlider[2].setBackground(
                             new Color ( 0, 0, getBlueColor() ) );
    // color of myPanel background
                   myColor = new Color (getRedColor(),
                             getGreenColor(), getBlueColor());
                   myPanel.setBackground(myColor);               
    // set methods to set the basic color shade
         private void setRedColor (int r){
              red = ( (r >= 0 && r <= 255) ? r : 255 );
         private void setGreenColor (int g){
              green = ( (g >= 0 && g <= 255) ? g : 255 );
         private void setBlueColor (int b){
              blue = ( (b >= 0 && b <= 255) ? b : 255 );
    // get methods (return the basic color shade)
         private int getRedColor (){
              return red ;
         private int getGreenColor (){
              return green;
         private int getBlueColor (){
              return blue;
         public static Color getMyColor (){
              return myColor;
    // main method                
         public static void main (String args []){
              MyChooserColor app = new MyChooserColor();
              app.addWindowListener(
                        new WindowAdapter() {
                             public void windowClosing( WindowEvent e )
                             {     System.exit( 0 );
    // inner class CustomPanel for drawing purposes
         private class CustomPanel extends JPanel {
              private int thumbSlider1 = 255;
              private int thumbSlider2 = 255;
              private int thumbSlider3 = 255;
              private Color myTextColor;
              public void paintComponent( Graphics g )
                   super.paintComponent( g );
                   g.setColor(myTextColor);
                   g.setFont( new Font( "Serif", Font.TRUETYPE_FONT, 12 ) );
                   DecimalFormat twoDigits = new DecimalFormat ("0.00");
                   g.drawString( "The RGB values of the current color are : "
                             + "( "     + thumbSlider1 + " , " + thumbSlider2 + " , "
                             + thumbSlider3 + " )", 10, 40);
                   g.drawString( "The current background color is composed by " +
                             "the folllowing RGB colors " , 10, 60);
                   g.drawString( "Percentage of RED from slider1 : "
                        + twoDigits.format(thumbSlider1*100.0/255), 10, 80 );
                   g.drawString( "Percentage of GREEN from slider2 : "
                        + twoDigits.format(thumbSlider2*100.0/255), 10, 100 );
                   g.drawString( "Percentage of BLUE from slider3 : "
                        + twoDigits.format(thumbSlider3*100.0/255), 10, 120 );
    // call to repaint occurs here     
              public void setThumbSlider1(int th){
                   thumbSlider1 = (th >= 0 ? th: 255 );
                   repaint();
              public void setThumbSlider2(int th){
                   thumbSlider2 = (th >= 0 ? th: 255 );
                   repaint();
              public void setThumbSlider3(int th){
                   thumbSlider3 = (th >= 0 ? th: 255 );
                   repaint();
              public void setMyTextColor(int r, int g, int b){
                   myTextColor = new Color(r, g, b);
                   repaint();
    //The following method is used by layout managers
              public Dimension getPreferredSize()
              {     return new Dimension( 150, 100 );
    The following is the code of application that tests the component
    //Application used to demonstrating
    // the homemade GUI MyChooserColor component
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    public class ShowMyColor extends JFrame {
         private JButton changeColor;
         private Color color = Color.lightGray;
         private Container c;
         MyChooserColor colorComponent;
         public ShowMyColor()
         {     super( "Using MyChooserColor" );
              c = getContentPane();
              c.setLayout( new FlowLayout() );
              changeColor = new JButton( "Change Color" );
              changeColor.addActionListener(
                        new ActionListener() {
                             public void actionPerformed( ActionEvent e )
                             {     colorComponent = new MyChooserColor ();
                                  colorComponent.show();
                                  color = MyChooserColor.getMyColor();
                                  if ( color == null )
                                       color = Color.lightGray;
                                  c.setBackground( color );
                                  c.repaint();
              c.add( changeColor );
              setSize( 400, 130 );
              show();
         public static void main( String args[] )
         {     ShowMyColor app = new ShowMyColor();
              app.addWindowListener(
                        new WindowAdapter() {
                             public void windowClosing( WindowEvent e )
                             {  System.exit( 0 );

    Yes, I want help for the missing code to add in actionPerformed method below. As a result, when you confirm the selected color (clicking the OK button), it will be transferred to a variable color of class ShowMyColor.
    // instanciate okButton with its inanymous class
    // to handle its related events
              okButton = new JButton ("OK");
              okButton.setToolTipText("To confirm the current color");
              okButton.setMnemonic('o');
              okButton.addActionListener(
                   new ActionListener(){
                        public void actionPerformed (ActionEvent e)
                        {     // code permetting to transfer
                             // the current color to the parent
                             // component backgroung color
                             //System.exit( 0 );     
              );

  • Accessing a gui component directly via getSource()

    Hi,
    to access a gui component I can access it by getting its object variable and casting it to its class type, e.g.:
    public class Tab02 extends JFrame {
         JTable tab = new JTable (rows, head);
         JTextField txt = new JTextField ("dimensions");
         JTree tree = new JTree(node.getRoot());
    class DragDropNode implements TreeSelectionListener, MouseMotionListener, MouseListener {
    public void mouseDragged (MouseEvent me ) {
         Cursor dragcurs = new Cursor(13);
    // me.getSource().setCursor (mdragcurs) does not work as getSource delivers an object type
         JTree tmp = (JTree)me.getSource();
    // me.getSource().setCursor (mdragcurs)
         tmp.setCursor (mdragcurs);     // as me.getSource().setCursor (mdragcurs)
         JTable tmp = (JTable )me.getSource();
         tmp.setCursor (mdragcurs);
    How can I cast the object automatically to the genuine type?
    Is there a method that returns the type and I can use this method to cast me.getSource()?
    Thanks

    Navigate to the folder enclosing it and enter Library in the Go to Folder command.
    (70632)

  • Updating the GUI from a background Thread: Platform.Runlater() Vs Tasks

    Hi Everyone,
    Hereby I would like to ask if anyone can enlighten me on the best practice for concurency with JAVAFX2. More precisely, if one has to update a Gui from a background Thread what should be the appropriate approach.
    I further explain my though:
    I have window with a text box in it and i receive some message on my network on the background, hence i want to update the scrolling textbox of my window with the incoming message. In that scenario what is the best appraoch.
    1- Shall i implement my my message receiver as thread in which i would then use a platform.RunLater() ?
    2- Or shall i use a Task ? In that case, which public property of the task shall take the message that i receive ? Are property of the task only those already defined, or any public property defined in subclass can be used to be binded in the graphical thread ?
    In general i would like to understand, what is the logic behind each method ?
    My understanding here, is that task property are only meant to update the gui with respect to the status of the task. However updating the Gui about information of change that have occured on the data model, requires Platform.RunLater to be used.
    Edited by: 987669 on Feb 12, 2013 12:12 PM

    Shall i implement my my message receiver as thread in which i would then use a platform.RunLater() ?Yes.
    Or shall i use a Task ?No.
    what is the logic behind each method?A general rule of thumb:
    a) If the operation is initiated by the client (e.g. fetch data from a server), use a Task for a one-off process (or a Service for a repeated process):
    - the extra facilities of a Task such as easier implementation of thread safety, work done and message properties, etc. are usually needed in this case.
    b) If the operation is initiated by the server (e.g. push data to the client), use Platform.runLater:
    - spin up a standard thread to listen for data (your network communication library will probably do this anyway) and to communicate results back to your UI.
    - likely you don't need the additional overhead and facilities of a Task in this case.
    Tasks and Platform.runLater are not mutually exclusive. For example if you want to update your GUI based on a partial result from an in-process task, then you can create the task and in the Task's call method, use a Platform.runLater to update the GUI as the task is executing. That's kind of a more advanced use-case and is documented in the Task documentation as "A Task Which Returns Partial Results" http://docs.oracle.com/javafx/2/api/javafx/concurrent/Task.html

  • BAPI to update the bulk component in the packaging order.

    Hi ,
    I am working for the process order.
    I want to update the bulk component in the packaging order with the goods receipt batch number of the bulk order.
    Is there any BAPI that I can use for updating the bulk component or I need to use the BDC?
    Regards,
    Kiran Kumar

    Hi Kiran kumar,
    As per my knowledge, there is no BAPI for process order component update
    you need to use BDC for this
    regards,
    sankaran

  • JSPM error when we are updating core-tools component.

    Hi Gurus,
    We are updating Service Pack on Java (GRC) System. In JSPM when we are updating core-tools component we are getting the below error message. Could any one let me know whats going wrong.
    Let me know if you have any questions.
    Jan 31, 2011 10:46:50... Info: Error handling strategy: OnErrorStop
    Jan 31, 2011 10:46:50... Info: Prerequisite error handling strategy: OnPrerequisiteErrorSkipDepending
    Jan 31, 2011 10:46:50... Info: Update strategy: UpdateLowerOrChangedVersions
    Jan 31, 2011 10:46:50... Info: Starting deployment prerequisites:
    Jan 31, 2011 10:46:50... Info: Loading selected archives...
    Jan 31, 2011 10:46:50... Info: Loading archive '/usr/sap/trans/EPS/in/CORETOOLS07P_2-20002784.SCA'
    Jan 31, 2011 10:46:53... Info: Selected archives successfully loaded.
    Jan 31, 2011 10:46:54... Info: Actions per selected component:
    Jan 31, 2011 10:46:54... Info: Update: Selected development component 'com.sap.engine.visualadmin'/'sap.com'/'SAP AG'/'7.0107.20100816112037.0000'/'0' updates currently deployed development component 'com.sap.engine.visualadmin'/'sap.com'/'SAP AG'/'7.0103.20081111105857.0000'/'0'.
    Jan 31, 2011 10:46:54... Info: Update: Selected development component 'tc/template_config_tool'/'sap.com'/'SAP AG'/'7.0107.20100428095633.0000'/'0' updates currently deployed development component 'tc/template_config_tool'/'sap.com'/'SAP AG'/'7.0103.20081105084616.0000'/'0'.
    Jan 31, 2011 10:46:54... Info: Update: Selected development component 'IAIKSecurityFS'/'sap.com'/'SAP AG'/'7.0106.20091119090313.0000'/'0' updates currently deployed development component 'IAIKSecurityFS'/'sap.com'/'SAP AG'/'7.0103.20081105085706.0000'/'0'.
    Jan 31, 2011 10:46:54... Info: Update: Selected development component 'tc/sapinst/fs'/'sap.com'/'SAP AG'/'7.0107.20100817122315.0000'/'0' updates currently deployed development component 'tc/sapinst/fs'/'sap.com'/'SAP AG'/'7.0103.20081111152535.0000'/'0'.
    Jan 31, 2011 10:46:54... Info: Update: Selected software component 'CORE-TOOLS'/'sap.com'/'SAP AG'/'1000.7.01.7.2.20100818104542''/'0' updates currently deployed software component 'CORE-TOOLS'/'sap.com'/'SAP AG'/'1000.7.01.3.0.20081208163400''/'0'.
    Jan 31, 2011 10:46:54... Info: Update: Selected development component 'com.sap.engine.client'/'sap.com'/'SAP AG'/'7.0107.20100816112037.0000'/'0' updates currently deployed development component 'com.sap.engine.client'/'sap.com'/'SAP AG'/'7.0103.20081111105857.0000'/'0'.
    Jan 31, 2011 10:46:54... Info: Update: Selected development component 'com.sap.engine.configtool'/'sap.com'/'SAP AG'/'7.0107.20100816112037.0000'/'0' updates currently deployed development component 'com.sap.engine.configtool'/'sap.com'/'SAP AG'/'7.0103.20081111105857.0000'/'0'.
    Jan 31, 2011 10:46:54... Info: Update: Selected development component 'com.sap.engine.deploytool'/'sap.com'/'SAP AG'/'7.0107.20100816112037.0000'/'0' updates currently deployed development component 'com.sap.engine.deploytool'/'sap.com'/'SAP AG'/'7.0103.20081111105857.0000'/'0'.
    Jan 31, 2011 10:46:54... Info: No action: Selected development component 'com.sapportals.supportplatformSDA'/'sap.com'/'SAP AG'/'7.0103.20081105090112.0000'/'1' will not be redeployed. Only the previous development component 'com.sapportals.supportplatformSDA'/'sap.com'/'SAP AG'/'7.0103.20081105090112.0000'/'0' will be updated in the SDM repository.
    Jan 31, 2011 10:46:55... Info: Ending deployment prerequisites. All items are correct.
    Jan 31, 2011 10:46:55... Info: Starting: Update: Selected development component 'IAIKSecurityFS'/'sap.com'/'SAP AG'/'7.0106.20091119090313.0000'/'0' updates currently deployed development component 'IAIKSecurityFS'/'sap.com'/'SAP AG'/'7.0103.20081105085706.0000'/'0'.
    Jan 31, 2011 10:46:55... Info: ***** Begin of File-System Deployment IAIKSecurityFS *****
    Jan 31, 2011 10:46:55... Info: Deploy Action is UPDATE
    Jan 31, 2011 10:46:55... Info: Update - no information about previously deployed files available. Deploy new files only.
    Jan 31, 2011 10:46:55... Info: Deploying Fileset SAP Java Cryptography Toolkit / SAPJavaCryptographyToolkit to /usr/sap/D19/SYS/global/security/lib
    Jan 31, 2011 10:46:55... Error: Error: Could not extract file engine/info/IAIKSecurityFS.list from archive /usr/sap/D19/JC19/SDM/root/origin/sap.com/IAIKSecurityFS/SAP AG/0/7.0106.20091119090313.0000/tc_sec_java_crypto_fs_lib.sda
    Jan 31, 2011 10:46:55... Error: Additional error message is:
    Jan 31, 2011 10:46:55... Error: /usr/sap/D19/SYS/global/security/lib/engine/info/IAIKSecurityFS.list (Permission denied)
    Jan 31, 2011 10:46:55... Error: Error deploying Fileset SAP Java Cryptography Toolkit to /usr/sap/D19/SYS/global/security/lib
    Thanks,
    Shankam

    Hi Sowjanya,
    I gave full access to the file but still no luck.
    Here is the log error message:
    Starting Deployment of CORE-TOOLS
    Aborted: software component 'CORE-TOOLS'/'sap.com'/'SAP AG'/'1000.7.01.4.0.20090417021948''/'0':Failed deployment of SDAs:development component 'IAIKSecurityFS'/'sap.com'/'SAP AG'/'7.0104.20090220131743.0000'/'0' : abortedPlease, look at error logs above for more information!
    Deployment of CORE-TOOLS finished with Error (Duration 1031 ms
    Starting Deployment of CORE-TOOLS
    Aborted: software component 'CORE-TOOLS'/'sap.com'/'SAP AG'/'1000.7.01.4.0.20090417021948''/'0':Failed deployment of SDAs:development component 'IAIKSecurityFS'/'sap.com'/'SAP AG'/'7.0104.20090220131743.0000'/'0' : abortedPlease, look at error logs above for more information!
    Deployment of CORE-TOOLS finished with Error (Duration 1031 ms
    Help plzzz..
    Thanks,
    Shankam

  • What is this gui component?

    HI all, I'm writing a program and I wish to use a gui component but I don't know what it is called and I was wondering if any of you could help.
    Its kind of like a text area but the text is separated into columns and each of the columns have headings. Each of the headings can be extended to show more of the text. It's like in microsoft windows when you view files showing all their detail and you get the headings name, size, date created etc.
    Any help on this matter would be greatly appreciated.
    Thanks

    It's not a jTable as that is more like a spreadsheet, it's similar but the edges of the cells aren't visible in what i'm talking about. and also what i'm after has 'tabs' at the top with headings in. If anyone uses a peer to peer file sharing application, its like what the results of a search are displayed in.
    Thanks for the help but if anyone has any more ideas they are very welcome

  • Updating the SAP Component Repository in the SLD

    Hi All,
    Can I get someone to clarify note 669669 - Updating the SAP Component Repository in the SLD for me?
    https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/sno/ui_entry/entry.htm?param=69765F6D6F64653D3030312669765F7361706E6F7465735F6E756D6265723D36363936363926
    Currently, I am on version:
    My Solution Manager is telling me:
    I don't see a newer version. Am I reading this incorrectly?
    Thanks,
    Diana

    The problem is with the CR Content version which is on 9.0 patch level and I see patch levels 12 and 13 available on SMP
    Check this article and update the CR Content
    http://scn.sap.com/docs/DOC-41516
    Regards
    RB

  • Calling a GUI component form jbase program

    Hello all,
    I have created a GUI component in Java. When I run it form DOS prompt its works fine,
    but when I call it form a Jbase subroutine the GUI is never displayed....the component runs in the background but for some reason its not visible.....plz help....
    Ankit.

    I am facing the same problem It calls the AWT but doesnt display it. Please help Thanks
    Divesh

  • Help - Bean Binding an SQL join to a gui component(jtable) in Netbeans?

    Good afternoon. I'd like to ask if there is a way to data bind an SQL Join from 2 or more tables to a
    GUI component(Jtable) in Netbeans. All the tutorials show is how to bind all the fields of 1 database table
    to the component. Under the BIND/ELements option the IMPORT DATA TO FORM menu only allows
    you to choose 1 among the database tables from a selected database.
    Is there a way to configure an SQL query and attach it to the component?
    Thanks.

    This is not a Swing problem. Try a NetBeans forum.

  • Trying to create Netbeans Swing/GUI component

    Hello,
    I'm trying to create a GUI component from the following code. The main idea is to create a component consisting of a checkbox and a panel. The panel can contain several other swing components. By checking or unchecking the checkbox I want all by components in the panel to be enabled or disabled.
    The important thing is that this component should work in the Netbeans GUI designer. I'm using Netbeans 5.5.
    My problem is the following:
    When adding my swing component to the Netbeans swing component palette and dragging onto a new form, I cannot assign other components to the main panel of my component. Even if I use the Inspector tree to drag components to be children of my component, the mouse icon shows a denying icon.
    If I add swing components programmatically, it works.
    Can somebody give me an advice what I should change in my code to make it work with the Netbeans GUI designer?
    Below you can find the current code of my standalone component. It includes a main() method so one can give it a try.
    Many thanks in advance!
    package test.swing;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class JEnabler extends JPanel {
        private JCheckBox checkEnabler = new JCheckBox();
        private JPanel contentPane = new JPanel();
        public JEnabler() {
            super.setLayout(new BorderLayout());
            checkEnabler.setSelected(true);
            checkEnabler.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
            checkEnabler.setMargin(new Insets(0, 0, 0, 0));
            checkEnabler.setVerticalAlignment(SwingConstants.TOP);
            checkEnabler.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
                    checkEnablerActionPerformed(evt);
            super.addImpl(checkEnabler, BorderLayout.WEST, -1);
            super.addImpl(contentPane, BorderLayout.CENTER, -1);
        private void checkEnablerActionPerformed(ActionEvent evt) {
            Component[] list = contentPane.getComponents();
            for (int i=0; i<list.length; i++)
                list.setEnabled(checkEnabler.isSelected());
    protected void addImpl(Component comp, Object constraints, int index) {
    contentPane.add(comp, constraints, index);
    public LayoutManager getLayout() {
    return contentPane.getLayout();
    public void setLayout(LayoutManager mgr) {
    if (contentPane!=null)
    contentPane.setLayout(mgr);
    public void remove(Component comp) {
    contentPane.remove(comp);
    public void remove(int index) {
    contentPane.remove(index);
    public void removeAll() {
    contentPane.removeAll();
    public static void main(String args[]) {
    SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    JFrame frame = new JFrame();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    JEnabler enabler = new JEnabler();
    JTextField tf = new JTextField("Test");
    enabler.add(tf);
    JButton test = new JButton("Click");
    enabler.add(test);
    frame.getContentPane().add(enabler);
    frame.pack();
    frame.setVisible(true);

    Can anyone tell me what I am missing?
    public void paintComponents(Graphics g)you're not 'missing' anything, in fact you've gained an 's'

Maybe you are looking for

  • How to Give MouseEvents for JTabbedPane??

    Hi All, I have some 10 tabs in a single JTabbedPane,So if i want to enlight the tab like when i just take my mouse cursor onto any tab it should have some effect/color changing,it should be higlighted in a different way compared to the other tabs.How

  • How to filter a search help??

    Hi everybody, I have a problem with a search help. I'm going to try to explain it. I have two dynpros, one is cancel and the other one is process. These two dynpros are the same the only difference is in the internal logic. They have three parameters

  • Service entry sheet printout

    Dear Expert, is there is anyway to print the service entry sheet please i want an answer ASAP

  • IPhone Will Not Connect to ANY Wi-Fi Networks

    I have an Airport at home that is completely open (no password, we live in the country) which my new iPhone can see in it's Wi-Fi Networks window, but when I try to connect it says, "Unable to join the network." So, I took the iPhone to the office wh

  • Mix 1440x1080 with 1920x1080 Footage in FCE?

    Last week I accidentally shot footage in 1440x1080 16:9 instead of 1920x1080 16:9. The rest of my footage is in 1920x1080 16:9. Can I combine both formats in FCE and create a 1920x1080 movie? Thanks!