Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[SWT] Text resize problem

 
Matthieu BROUILLARD
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for the cross-post, i have first post in "Java In General" but this forum should be a better place...


Hi all,

i have a problem resizing a Text in a GridLayout.
i have simplified my problem in the following example.
What i want to do is to resize the text1 Text widget correctly.

Here are some screenshoots of what happen, and i post my little example to reproduce.

Thanks for help.

2 columns mode (window is packed)

2 columns mode (window is extended)

3 columns mode (window is extended)


To switch between modes, just give a parameter to the main.

 
Aurelien Faillon
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
d'apr�s ton nom tu as l'air d'�tre fran�ais...

je te reponderais donc que j'aurais utilis� le SWING plutot que le SWT... je trouve plus simple d'utilisation...
en plus pour le SWING tu peux aller voir sur la javadoc...
http://java.sun.com/j2se/1.4.2/docs/api/

sinon il doit surement y avoir une m�thode du style de "setSize"...

[ August 05, 2004: Message edited by: Aurelien Faillon ]
[ August 05, 2004: Message edited by: Aurelien Faillon ]
 
Matthieu BROUILLARD
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have found the solution, i made a missunderstanding between widget style and widget alignement. To correct the problem just replacebythe javadoc is not very very clear in SWT...
 
Matthieu BROUILLARD
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Aurelien Faillon:
je te reponderais donc que j'aurais utilis� le SWING plutot que le SWT...
Thanks, but i need to use SWT as the final goal of the window was to be integrated into an eclipse plugin. Sure, Swing is much more documented than SWT but when you don't have the choice...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic