setBounds for Borders


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: setBounds for Borders

  1. #1
    Join Date
    Aug 2003
    Posts
    5

    Question setBounds for Borders

    Hello.

    i have a TitledBorder which I want to use the setBounds() methods to set its position and size in a Panel. The panel itslef has a layout set to NULL.. I can place buttons, sliders etc etc and all work with the setBounds method except the TitledBorder. It won't compile. I looked at the API documentation and i noticed that the class does not inherit anything from the Component class, therefore missing the setBounds() method!

    how can I get around this? Would i need to create a new border class that extends TitledBorder and somehow incoporte the Component features? How would such thing be done??


    Thanks in advance!!!

  2. #2
    Join Date
    Mar 2003
    Posts
    834
    "how can I get around this? Would i need to create a new border class that extends TitledBorder and somehow incoporte the Component features? How would such thing be done??"

    No, that would require multiple inheritance.

    I don't think you can "set the bounds" - it'll be as large as the String it contains.
    ArchAngel.
    O:-)

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