Setting size of Label in FlowLayout


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Setting size of Label in FlowLayout

  1. #1
    Join Date
    May 2005
    Posts
    22

    Setting size of Label in FlowLayout

    Hi, I have a bunch of lables in a flowlayout.

    I want to have these labels start with nothing in them but have a white background. So i dont want them resizing to nothing cause theres no text in them. setSize doesnt work. They are in a flowlayout.

    I haerd about setPrefferedSize but dont know how or if it works.

    any ideas? Thx

  2. #2
    Join Date
    Oct 2005
    Posts
    107
    I'd say setBounds() but I'm not sure how that would work with flow layout.

    otherwise you would have to set all these
    setPreferredSize()
    setMinimumSize()
    setMaximumSize()
    the layout decides which it uses so set them all to be safe.

Similar Threads

  1. queues how to print it
    By xsouldeath in forum Java
    Replies: 0
    Last Post: 12-10-2005, 10:56 PM
  2. button listener not working
    By DrunkinP in forum Java
    Replies: 0
    Last Post: 03-31-2005, 09:36 AM
  3. Replies: 0
    Last Post: 07-22-2002, 11:52 AM
  4. Replies: 2
    Last Post: 03-07-2001, 08:25 PM
  5. Font Size
    By dewa in forum Web
    Replies: 0
    Last Post: 12-13-2000, 09:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center