SetText() is not working ....please help

hello all,
i am really stuck at something silly in my program, my code is huge to post in here, so i will try to describe as much as i can.
well my problem is i have a class which listen to a socket, when some data has been changed, i want it to modify a JPanel in "another" class, which is the main class of my GUI, by changing the text in that panel.
i am using setText(Sting), but it doesnt work.
i tried to call a method from the listen class to the main and that method have a print statment and setText() call, i checked that the statment is being printed, "which tells me that the listen class is calling that method in the main class, but the text doesnt change.. i tried repaint, revalidate... please help ..
thx for ur time.

i am trying to give u the closest picture of my code:
public class SetTextTest extends JPanel{
     public JPanel updateHistory;
     private JButton updateHistoryButton;
public JLabel updateLabel;
     public String updateStatus = "Updates: ";
     String updatesList ="";
String updatesIds="", updatesTimes="";
     int numOfupdates = 0;
     public SetTextTest() {
          super(new BorderLayout());
          updateHistory = new JPanel();
          //Set up Updates History Panel
          updateHistory.setLayout(new BoxLayout(updateHistory,BoxLayout.Y_AXIS));//new BorderLayout());
          updateHistory.setMaximumSize(new Dimension(300,250));
          updateLabel = new JLabel(updateStatus + numOfupdates);
          updateHistoryButton = new JButton("Check Updates");
          updateHistoryButton.setPreferredSize(new Dimension(120,25));
          updateHistoryButton.addActionListener(new ActionListener(){
               public void actionPerformed(ActionEvent e){
                    //open a table
     updateHistory.add(updateLabel);
     updateHistory.add(updateHistoryButton);
     public void newUpdates(){
          numOfupdates++;
          java.awt.Toolkit.getDefaultToolkit().beep();
          System.out.println(updateStatus + numOfupdates);
          updateLabel.setText(updateStatus + numOfupdates);
}

Similar Messages

Maybe you are looking for

  • Dual boot Windows 7 on Mac Mini Server

    I have a Mac Mini server (2012) with two 1tb harddrives. One has osx Mavericks installed and I have been using it for the past 5 months. The other is completely empty. I was wondering if i could partition the empty drive and install Windows 7 on it f

  • Greyed out songs show in itunes from ipad?

    I have itunes match enabled, I have no songs on my ipad, (I have deleted songs via Settings>Storage>Music>Clear all music) also tried turning itunes match on and off. So Im sure there are no songs on my ipad, yet when I connect my ipad to itunes, the

  • No valid XSLT program supplied in XSLT Tester (Transaction code: STRANS)

    Hi I a trying to execute the Simple Transformation through STRANS (XMLABAP) I am supplying Transformation, Source File Path as input. Problem When I am trying to execute it is giving the following error XSLT Tester                                   

  • Cropping in a circle

    Sorry, this is a very basic question but i can't seem to figure it out. I am trying to  make a circle logo and some of my vectors are half in and half out of my circle shape, what i want is for anything outside the shape to be cropped/not visible in

  • Change back and icloud account iphone 5

    Hello, my boyfriend connected his iphone to his cousin mac computed and it synked with his cousin icloud so he lost all his information. Even his background pictured changed and his emails accounts!! We need to know how to change back his icloud acco