![]() |
| ||
| adding a JFrame component to JTabbedPane Hello folks, I am trying to add a JFrame object into JTabbedPane, but I am getting a java.lang.IllegalArgumentException. Here's my code snipt. // other codes...Here I have flightInfoPane class's declaration... class FlightInfoPane extends JFrame {This is the error that I am getting. I am not sure if this operation is allowed. F:\DCTM_WORK>java FlightReservationDesktop.Reservation please advise... Thanks. |
| ||
| Re: adding a JFrame component to JTabbedPane A JFrame is a top-level component. It can not be "added" to another. Use a JPanel. |
| ||
| Re: adding a JFrame component to JTabbedPane I agree with Masijade, and I think you could probably just change the JFrame inheritance to JPanel, well depending on your actual coding hehe Anyway, what I wanted to recommend is NetBeans. It’s a very innovate IDE when one is dealing with GUI applications :icon_cool: You’d just create a new Java project and create a new GUI form; then you can drag and drop components just like in Visual Basic, but since it's Java it's better :icon_mrgreen: You certainly don’t have to code within NetBeans; just copy the automatically generated GUI code to the IDE that you’re using. |
| All times are GMT -4. The time now is 3:26 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC