Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

JComponent

Options
  • 30-04-2003 12:50pm
    #1
    Closed Accounts Posts: 1,718 ✭✭✭


    I have a problem with a JComponent object. basically i have a JComponent object already created & i need to put a couple of JPanels into the GUI beside it. dont know if im explaining myself very well here.

    right what im asking is : id there a parent that will take both JComponent and JPanel or do i need to change the JComponent to something else to make it work. ive already tried changing it to JFrame, MainFrame etc but nothing seems to work.

    i tryed using a JSplitPane but that dosent seem to want to take the JComponent. i was thinking of JRootPane or something similar


Comments

  • Closed Accounts Posts: 679 ✭✭✭ciano


    Im not really sure what you mean here. Can you clarify it a bit?
    is there a parent that will take both JComponent and JPanel

    Well JPanel extends JComponent, so Im a bit confused as to what you mean.

    You could put your JComponent and your two JPanels in a JFrame, or even another JPanel.


  • Closed Accounts Posts: 358 ✭✭CH


    have a look at suns tutorials


  • Closed Accounts Posts: 1,651 ✭✭✭Enygma


    I often use http://www.javaalmanac.com for this type of question. It's got thousands of little code snippets.


  • Closed Accounts Posts: 1,718 ✭✭✭whosurpaddy


    thanks for the replies lads. turned out the prob was i wasnt laying the new panels out properly using NORTH, SOUTH etc. i was convinced i had the wrong container object. sorry if i confused anyone;)


Advertisement