This week's book giveaway is in the JDBC forum.
We're giving away four copies of Make it so: Java DB Connections & Transactions and have Marcho Behler on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes programe structure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "programe structure" Watch "programe structure" New topic

programe structure

Ransika deSilva
Ranch Hand

Joined: Feb 18, 2003
Posts: 524
hello world,
I am programming a jtabbedpane. i am thinking to have sperate classes for every tab.
public class frame display
public static void main(String arg[])
JFrame obj = new app(); // do the necessary things
class app extends JFrame
// add a JTabbedPane to the contentpane.
// create objects of each tab class
// add them to the JTabbedPane
class billingJPane extends JPanel
class searchJPane extends JPanel

what i want to know is is this a good structure. if not do some suggetions.
another question.. can i access a variable of searchJPane class for this syntax.

SCJP 1.4, SCMAD 1.0<br />SCWCD, SCBCD (in progress)
Di Shoe

Joined: Jun 20, 2003
Posts: 7
Did you read my previous reply to your question? Why open the same issue?
Your programming structure is fine. And you can access the variable of another class as long you make that variable public global variable. But better yet, make it private and provide public methods in the class to access it.
I agree. Here's the link:
subject: programe structure
It's not a secret anymore!