This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am porting a Swing/AWT application to RCP/SWT. I created the top-level portion of my UI to use RCP/SWT. I have the view which parents an embedded Composite which parents a TabFolder containing TabItems. As a first step, one of my TabItems parents an AWT Frame (e.g., SWT_AWT.new_Frame(this)) which then parents the crux of my original Swing/AWT UI.
In this part of the UI I have a JPanel parenting a variety of centered JLabels. I also have an application thread that runs in the background and updates the text in these labels (e.g., status). In the Swing/AWT application, as the text changes (and gets longer and shorter), I see these changes and the length of the JLabel expands or collapses as necessary. In the RCP/SWT application, while I see the text changing, the length of the JLabel does not change. As a result, the new text is truncated (in the case it requires more space than there currently is) or not centered (in the case it does not require as much space than there current is).
I have tried calling revalidate(), validate() and repaint() on the JLabel and parenting JPanel.