DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  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:-)

Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links