Need help and advice on designing relations of classes

I tried to use JInternalFrame which contains an extension of JPanel as the UI content (with actionListener for the buttons inside it). The Panel is contained in a JScrollPane.
jIntFrm = new JInternalFrame("-Title-", true, true, true, true);
jIntFrm.setLayout(FlowLayout());
jIntFrm.add(new JScrollPane(new PnlEntry()));
The user clicked the button inside the panel (PnlEntry) to close the JInternalFrame containing this panel or another button to do operations that will need to display another JInternalFrame containing another extension of JPanel.
Please give me advices on how these should be done, so that it makes good OO relations.
Right now, I'mdoing it like this:
public class mainFrame extends JFrame{
JInternalFrame jIntFrm; //AND OTHER INTERNAL FRAME
jIntFrm = new JInternalFrame("-Title-", true, true, true, true);
jIntFrm.setLayout(FlowLayout());
//THE PANEL IS GIVEN THE REF AND MEMORIZE IT UNTIL IT
//INVOKES mainFrame.panelExit(JInternalFrame)
jIntFrm.add(new JScrollPane(new PnlEntry(this, jIntFrm)));
panelExit(JInternalFrame jif){
if(jif == jIntFrm){
jIntFrame.dispose();
jIntFrame = null;
panelContinueProcess(JInternalFrame jif, Object someID){
if(jif == jIntFrm){
jIntFrame.dispose();
jIntFrame = null;
//start displaying another JInternalFrame with the appropriate Panel in it
Is this all is OK?
Please give me your advice
Thx,
David

Maybe read on MVC (Model-View-Controller) pattern? It's practically the standard for Swing applications (even Swing itself follows the pattern).
You don't want to clutter your frame with behavioral code.

Similar Messages

  • Hi, I need help and advice. Basically me and my ex partner both had iphones and synced it with the same computer under the same ID. We split i have a new laptop and now it keeps asking for the old ID or it'll erase my apps bought on theold account.

    Hi, I need help and advice. Basically me and my ex partner both had iphones and synced it with the same computer under the same ID. We split up and now im trying to get all my apps and info onto my new laptop with a new account but it keeps asking me for the old apple ID which she is still using and she changed the password. i tried backing it up but still nohing. When i try to back up purchased items being apps etc its keeps asking for the old one. help

    See Recover your iTunes library from your iPod or iOS device. But you'll still need the password.
    Once you have the computer authorized to use the account she could change the password again to stop you buying apps on her card (assuming it's not on yours!). It would lock you out of upgrading them too but they should work unless she uses the deathorize all feature.
    It depends on how amicable the split is...
    tt2

  • Need Help and Advice Rebuilding!

    Hi All!New here, and in desperate need of advice on rebuilding my credit. My score has now dropped from 550 to 429 based on some medical bills (11) in collections from when i was uninsured, totaling about  $9,000. I briefly considered using a credit repair company, but am skeptical of paying so much for something i can mabe do myself. My question is how do i go about getting these items off of my credit report? I obviously do not have $9,000 lying around. A coworker told me she had used Sky Blue, and another said Lexington Law was good, but that i could probably generate my own dispute letters. Is disputing these accounts the best way to go? What should I do?? I'm so confused. 

    Hi All!New here, and in desperate need of advice on rebuilding my credit. My score has now dropped from 550 to 429 based on some medical bills (11) in collections from when i was uninsured, totaling about  $9,000. I briefly considered using a credit repair company, but am skeptical of paying so much for something i can mabe do myself. My question is how do i go about getting these items off of my credit report? I obviously do not have $9,000 lying around. A coworker told me she had used Sky Blue, and another said Lexington Law was good, but that i could probably generate my own dispute letters. Is disputing these accounts the best way to go? What should I do?? I'm so confused. 

  • Totally New to RMI, need help and advice.

    Hi, all experts.
    I am totally new in Java RMI. When I run a sample RMI application, still got problem.
    Please give me some advice or recommend some basic materials for me to catch up.
    Appreciate for you help. I need to finish one RMI project in a short period.
    best regards,
    Xiong Fei

    The Java tutorials are usually a good place to start. Try: http://java.sun.com/docs/books/tutorial/rmi

  • Hi - I am new here: I need help and advice on the White Macbook - thanks.

    Hi all,
    I'm a new member to this forum + I am soon to be a new user of the Macbook.
    I have ordered my new White 2.16 Macbook with an upgraded 2GB RAM & an upgraded 16GB HDD.
    I have some questions which I would like answered please:
    1) How likely is it that my macbook will get the cracks near the wrist rests?
    2) How likely is it that my white macbook will discolour? Are the latest 2007 range also facing discolouration like last years models? How soon does the discolouration start to show?
    3) Is the macbook a SOLID build? Or does it feel cheap when you touch and feel it?
    4) How likely is it that the outer glossy body will get stratched? I remember the previous Ipods were poor quality and got stratched even by normal use or by putting it in your EMPTY pocket.
    5) How likely is it that I will encounter hardware issues?
    6) Is the Macbook AS GOOD AS Apple say it is?
    Reason I am asking all these questions is because I am investing quite abit of money in a never before used item and with a company who I have never dealt with.
    But having read all the issues and problems with apple products one has to ask these simple questions.
    I mean even if you go out and buy a real cheapo laptop you would almost never come accross these poor quality issues in such a short time period has Apple users are stating.
    Thanks, I look forward to the answers.
    PC   Windows Vista   Awaiting delivery of my new White Macbook: 2.16GHz - Intel Core 2 Duo - 2GB memory - 160GB hard drive.

    1) It's impossible to guess the likelihood of cracks. We don't have the numbers.
    2) Discolouration seems to have been a problem specific to some earlier ones.
    3) The MacBook is solidly built, but still feels more fragile than a MacBook Pro or even an iBook.
    4) the outside plastic is easily scratched.
    5) impossible to say, we don't have the numbers
    6) Yes, it is that good. Great computer.
    Any question you wrote which includes the words likely or likelihood is impossible for users to answer meaningfully, since we don't have access to any good numbers. Just from watching this discussion board, it might appear that cracks and discoloration are likely, but since Apple has sold millions of these things, these issues might really be measured as a small fraction of a percent. We just can't know.
    Quad G5, PB 15" 1.5Ghz,MacBook 2.0GhzCore2Duo   Mac OS X (10.4.10)   Logic Pro 7.2.3, Focusrite Saffire...

  • A very new user needs some help and advice....

    Hi,
    I have just taken the bold leap into Indesign and this is the first day of my 30 day trial.
    I need help and advice from you good poeple...please.
    I have been successfully creating A5 booklets (folded A4) using MS Word and printing to a desktop printer. MS Word sorted out my page order for me at printing time so the correct pages were put together.
    I have been reading as much information as I could find but I am still unable to do the same in Indesign.
    I'm looking forward to using the advanced layout features and having control over what I do but, I need to work out this basic step before I go any further.
    I hope what I have explained makes sense.
    Regards
    John

    So presumably you create a new document, A5 portrait, facing pages. Make sure your ducument page count is a multiple of 4.
    Create, type, tweak, ponder, edit, smile, save.
    To create you booklet using InDesign, from the file menu select Print Booklet.
    You will probably need to jump back and forth from the Print Settings button adjusting Paper Size, Orientation, Color, and from the Print Booklet tab set for 2-up Saddle Stitch.
    Much has been posted on this topic, these are the basics, Print Booklet is not the best module Adobe ever wrote, IMO

  • I am using InDesign CS5. I have a body of text which is ranged left with tabbed indents. My client now wants the copy to be justifed, keeping the tabbed indents. Help and advice needed please!

    I am using InDesign CS5. I have a body of text which is ranged left with tabbed indents. My client now wants the copy to be justifed, keeping the tabbed indents. Help and advice needed please!

    Hi
    That screen grab helps a lot. There’s a much easier way of doing what you’re doing.
    Remove all your tabs and set the text in justified paragraphs.
    I’ve typed in dummy text in the example I made below, but after “19.1” put in a space and put your blinking cursor after the space and before the ’N’ of ‘Notices'.
    Then hold down the Command key and hit Backspace (on Mac at least - it’s the key between the Inverted commas/ apostrophe key and the return key).
    The text will jump into place the way you want it to.
    Hope that helps
    Paul
    PS You can set a tab, instead of using a space, in the description I gave above. So, after 19.1 or 19.2 or 19.185 etc etc insert a tab, then hit the Command Backspace after every paragraph number and they'll all line up exactly together. You'll find that editing text within the paragraphs
    after you've set it will be LOADS easier this way.
    You can put the tab anywhere you want it to be using 'Command-ShiftT' and putting a 'left align' tab just after the number. Just type the Command Backspace after the paragraph number and it'll work

  • The product that I purchased is not working!!!! I need help and I've been stuck in your "Contact us loop" for the last few days and I'm getting frustrated. How do I contact you for HELP!

    The product that I purchased is not working!!!! I need help and I've been stuck in your "Contact us loop" for the last few days and I'm getting frustrated. How do I contact you for HELP!

    Probably the best place to start is the right forum for your product. This is the forum for Distiller Server, a long dead product used by big companies, and probably not what you have. If you can't find the right forum, please let us know the FULL name of what you paid for (please check your invoice, as Adobe have many similar products), and we can perhaps direct you. Good luck!

  • I have an urgent question about my indesign. I had problems with the creative cloude app and then uninstalled it and then installed it again. Now it is not opening and I cannot download it again either. Pls give me help and advice if there is anything I c

    I have an urgent question about my indesign. I had problems with the creative cloude app and then uninstalled it and then installed it again. Now it is not opening and I cannot download it again either. Pls give me help and advice if there is anything I can do to repair it

    Please authorize ADE 3 with same credentials that you used with older version of ADE

  • My iPhone4s turned itself off and will not turn back on unless it is charge data all times. I need help and answers please.

    My iPhone4s turned itself off and will not turn back on unless it is charged at all times. I need help and answers please.

    And we would need more info. "will not turn back on unless it is charged at all times." is pretty obvious: the phone will obviously not turn on unless it is charged.
    Describe your problem clearly.

  • A newbie in need of help and advice

    I was wondering if someone could help and advise me...
    I got my macbook at the beginning of the year.. I love it, so far. BUT as its my first mac, I know nothing about them or how to proceed.
    I understand there is a thing called 'bootcamp', where I can install Windows. I have just started college and a lot of the stuff I will be working on in class, I would like to continue at home, so I need windows.
    Obviously after persuading my hubby to buy me a mac, I cant turn around and say its no good for college work. Now this bootcamp and installing windows... would I get virus's like a normal windows computer? This was my big thing about buying a mac, the lack of virus.
    How do i even go about getting windows? etc
    Many thanks in advance
    Nic

    Hi Nic,
    You can buy your own genuine copy of Windows from either Microsoft or a reliable reseller like Amazon. I would recommend Windows 7 Home Premium. On Amazon you can find a reasonable discount at the link below.
    http://amzn.to/qVtBvK
    Once you get your copy of Windows, you can proceed with the Boot Camp installation.
    1. Open Boot Camp Assistant after backing up important files and documents.
    2. You should have a Snow Leopard OS X DVD on hand if you bought the Mac last year. If you don't, click the bullet that says "Downoad the support software for this Mac," and you should save all of that to some external source like a flash drive or external hard drive, CD, DVD, something.
    3. If you do have an OS X DVD, click that bullet instead.
    4. Partition your hard drive. It may sound intimidating but all it means is divide the space according to how much you want to give Windows and how much you want to leave for Mac OS X. Dividing in half is usually the easiest way so click "Divide Equally."
    5. Click Continue and when you are prompted, insert the Windows DVD and click Start Installation.
    6. When the Windows Installer prompts you to select a place to install, click on the partition of the hard drive that says "BOOTCAMP" and click Drive Options > Format so Windows can install correctly. It will tell you it won't be able to install at first, but when you click Format under Drive Options, it will be able to.
    7. Proceed with the Windows installation. When it has to restart, hold down the Option key as your computer turns on and select the hard drive that says "Windows," NOT the CD/DVD icon that says "Windows".
    8. Continue with the installation. When it is done, you can insert your Mac OS X DVD (on Windows) and install the Boot Camp drivers, or if you saved it to an external source, connect it that way and install.
    9. To change between operating systems, just restart the computer while holding down the Option key and when the menu appears, double click on the OS you'd like to start up with.
    Feel free to ask if this seems confusing at all.

  • TS1702 how can I get anyone to give us answer on the iphone apps casino game we purchased few days ago which once the token was finished we were not able to reset and play just for fun and not for gambling. we need help and not to be charged additional

    few days ago I have purchased Iphone casino games from itunes apps store. One of the game was made by the company called "ARISTOCRAT" dragan game. Usually we will get basic tokens to play the game, and if we ran out of the tokens all we need to do is going into "manu" and "setting" selete "dream" and reset that we should be able to continue play the game with same amount of the basic tokens. The one game would not let us to go back to the game. There were msg came out said" game center requires an active connection to the internet"? I didn't feel comfortable because we purchased the game for $1.99 to play for fun and not to gamble. We do have credit card on your file. We don't want to be charged alot of money for something not in our well. I need help to answer the question on the following:
    1.  Are we able to ever play this game again without going to internet? We don't even know which site to go to, because when we press the ok button nothing else came out to direct us to any area.
    2. We only purchased the few days ago order ID: MGT74GN6V7 on 10/03/12. all the other games we purchased we were able to continue to play by doing the same setting.
    Thank you for your help and looking forward to hear from you!

    You need to contact itunes support
    We are all itunes users just like you.
    http://www.apple.com/support/contact/

  • HP Warranty Repair Help and Advice

    I need help to resolve an issue that I'm having.
    I sent two of our desktop computers to HP for a warranty repair.
    I shipped them in the HP provided boxes with the HP provided shipping labels.
    They were both delivered to the HP repair center in Jeffersonville, IN. One of them on 3/25 and the other on 3/26.
    We received one of them back very quickly (Order Number BDRJ727001).
    We still have not recieved the other one (Order Number BDRH838402)
    I have now called 4 times to get a repair status from the toll free number support line.
    I have been promised updates to my order each time I have called within 48 hours. I still do not have any updates to my order. The first 3 reps told me that the repair center has my computer and is working on it. 
    The last rep I spoke to told me that the repair center received an empty box and she would escalate the repair. This is the first time that I have been told this. The first 3 reps said nothing about this.
    I don't believe that anyone will be calling me back or giving me an update since nothing has happened as promised yet.
    We have 18 HP computers and all are used daily. We really need this computer back so we are not short a workstation. We have been without it for almost 2 months now.
    Is there someone else we can call or speak to regarding this issue? 
    Thank you for your help.
    Richard

    Hi @rich251 ,
    I have sent your issue to be reviewed and do check your private message for a HP employee to reach out to you. I hope this will help out with you problem.
    Best,
    Russ
    I worked for HP.

  • I very need help and fast my ipod touch 4 is dented on the top left corner and the screen is not in the silver part and because of that i think...when i open my ipod half of the screen is light white

    hi i very need help my ipod touch 4th was already damages (the glass screen wasnt in the silver part) and yestarday i was cleanin my room while listeng to music and my ipod fell 2 times after about 30 min half of the screen was light white first i thought it was a virus so i fully shut down my ipod and i also restored it but it didnt work so looked closly and saw that the left corner on my ipod was badly dented inward after i thought for a bit i thought that the spary i was using to clean my room could have gone in my ipod because the glass screen wasnt in the silver prt but i dunno if this prob cant be fixed at home by me does someone know how much it will charge 2 get it fixed and where i can get it fixed THANKS it wuld be a great help plz reply as soon as possible xoxoxox

    This has happened to me but i don't know what to do because my Itunes kept closing down and it shut down half way through updating and it just comes up with a silver apple and it won't turn off and now it's just frozen and it also doesn't recognise it when i opened up itunes again after i reset it to the factory settings

  • Need help in installing the designer db

    Hi All!
    I have two instances up and running on Oracle 9i. These two were created with the help of export.dmp files.
    Now, I will have to get the designer up and running on Designer 6i. I have few dmp files for the designer DB. Iam not sure how to go ahead with the installation of the Designer. It is because, when I tried logging into the Designer, I was prompted to create a repository and when I tried creating the repository, I imported an export.dmp file and now, it does not allow me to login. Iam thrown out with an error saying : " You are attempting to connect to a previous release of the repository".
    Any thoughts???
    I thank you for your time and help in advance!
    Regards,
    Aparna.

    Hi venkatesh,
    To create JCO follow the procedure.
    Logon to portal>content admn>create JCO destination-->Here u have create Jco for ?Model data and Metadata.
    steps invovled in it.
    1.      Define general data
    2.      Define the J2EE cluster
    3.      Define the data type and connection type
    4.      Define the application server or message server
    5.      Define the security settings.
    Please follow the link for more information.
    http://help.sap.com/saphelp_nw04/helpdata/EN/3a/3b1b40fcdd8f5ce10000000a155106/content.htm
    Regards,
    srikanth

Maybe you are looking for

  • Close Open Amount on A/P Down Payment Invoice

    Hi, I have the following scenario: I have created an A/P down payment invoice for 1000$ Create an Outgoing Payment for this A/P Down Payment Invoice for 1000$ This payment is closing the A/P Down Payment invoice Create an A/P Invoice for 800$ - apply

  • Connection time out error in HTTP

    Hey guys i m getting connection time out error in a HTTP scenario,when i go in SXMB_ADM i dont find any entry with the name HTTP_TIMEOUT. even in RZ10 i cant find the correct profile parameter. i m taking help from michaels blog /people/michal.krawcz

  • Using Google toolbar window

    I went from I-Explorer to Firefox and I love it. I miss a Google toolbar where the highlighted text from a web page is automatically transferred to the Google window – no need to cut and paste. Anything in Firefox like this?

  • Autonumber that increases whenever form is opened

    I have a very detailed form that I created in Acrobat 9 that has an autonumber field that increases by one everytime that it opens. I need to change some things on the form, so I want to work on it in LC ES. I am unable to find how to make this auton

  • Mssqlserver 2014 backup to disk crashing host on windows 2012R2

    Setting up updated mssqlserver host ( older dell R710 ) with windows 2012R2 std and SQL server 2012 Std edition with 96 gb Ram. SQLserver is allocated 64 GB ram. Our user database sizes are 650 Gb and 1.5 Tb .  Data devices reside  in DAS and we use