Single Frame with Back and Next Jbutton support for Swing

Hi All,
I need a help regarding to th JFrame.
I have to design a tool with Back and next button with a single frame. With Next button action i should move to a new Frame content and with Back button i should back to the previous one.
How should i proceed?
Thanks a lot in advance.

1) That's a Swing question. There a {forum:id=950} forum.
2) This is a very common need. There is no built-in widget in the JDK, and a lot of custom approaches, including in libraries. Google for "Java Swing wizard"
3) If you roll your own, the simplest way, as far as the GUI layer goes, is to stuff your panels in a CardLayout, and have your buttons switch the current "card". Very simple: http://download.oracle.com/javase/tutorial/uiswing/layout/card.html
4) The trick may be in keeping the "business logic" in sync (if for example panel 2 depends on processing info from panel 1). If you're new to java and Swing, make sure you understand objects and references

Similar Messages

  • Problem with Back and Next Buttons: a solution?

    Hello,
    It is well known that including the Back and/or Next buttons in Captivate quiz questions presents real problems. I have come up with what I think to be a solution. It should allow one to include both Back and Next buttons, if one wants to do this. It involves doing the following:
    With Question 1, do not include a Back button. (This is so that the quiz-taker cannot get out of the quiz scope in the forward direction.)
    Create this advanced action: If cpQuizInfoTotalUnansweredQuestions = 0, then Go To The Next Slide (i.e. the results slide); Else Continue.
    Insert a slide after the final question (and before the results slide). On this slide, include the following:
    A message to this effect: ‘You have not answered all of the questions. Please go back and complete all of them.’
    A button labeled ‘Return to Questions’ (on success: Jump to slide with Question 1). But include no other buttons. That is, if the quiz-takers lands up on this slide, he or she has only this option.
    On Enter (i.e. on entering the slide being described here), Execute Advanced Action =  the advanced action described in Item 2 above.
    Now for something odd. Before the slide described in Item 3, insert a slide with a Text Caption with variable $$cpQuizInfoTotalUnansweredQuestions$$. Keep the slide as brief as possible (something like 0.5 sec.) and make the text of the Text Caption invisible. And why all this? Because I found that, without it, problems arose quite regularly. If one or more questions were not answered, the quiz-taker would come, as expected, to the slide described in Item 3 above. The quiz-taker would then go back to complete the unanswered questions. But then—sometimes—the Item 3 slide would still appear, even though all the questions were answered! The quiz-taker would return once again to the questions (since this is the only option available), only to find that now none of the questions were answered! And at this point, there was no escape: the Item 3 slide would always appear no matter what one did. Why should inserting the additional slide described in the present item solve the problem? I don’t know. All I can say is that (1) without it, the problem arises often (though not always), and (2) with it, the problem hasn’t occurred yet, even though I’ve done lots of testing.
    Final note. It will be clear that this solution is meant to be used together with the option Allow Backward Movement. Will the solution work with Branch Aware? I don’t know yet. Will it work with Question Pools? Again, I don’t know yet. I’ve only done a bit of testing in both cases. The results thus far indicate that at least one of these options presents real problems. Both might.
    I’m still testing this solution (or what I hope is a solution). If anyone else wants to try it, I’d be interested in hearing how it goes.
    Best regards,
    Marvin DuBois

    Dear Lilybiri,
    Thank you for your response.
    1. 'I don't get it why you don't use the Submit All option?'
    Submit All is fine in some cases. But it limits the options: the quiz-taker does not get immediate (question-by-question) feedback. So where immediate feedback is wanted, the Submit All option presents problems.
    2. "Why do you need a Back button . . . ?'
    a. The Back button is needed during Review. Otherwise, the quiz-taker can only review in one direction.
    b. In some quizzes, the quiz-taker should be free to go back, whether to check earlier question slides (since the questions and/or responses can be relevant for the current question) or to re-read/re-hear information slides inserted between question slides.
    But the more general issue is this. The Cp Back and Next buttons provide us with possibilities, with further options. Workarounds are available, such as not allowing backward movement and placing a Clear button over Next. But these workarounds limit the possiblities, i.e. the possibilities that are there—i.e. that Adobe puts there. It's not that we always need these possibliities. But neither should we be hindered from using them if we so choose—and especially when we would be hindered simply because Cp doesn't work as well as it should.
    Kind regards,
    Marvin

  • How do I position the back and next buttons in a full screen lightbox

    I'm working on a portfolio website, and it has five sections (each section is 1440px wide).  I am trying to put in a full screen lightbox for some images.  When I adjust the settings for the lightbox, I am just keeping the Back and Next buttons.  However, when I put the buttons in one place, they either appear in a different position in the browser, or just don't appear at all.  Maybe there's a technique I am missing with regards to putting the buttons in a place most computer browsers will be able to find it.  (Pictures of the problem are below, and they use the sample pictures for the slideshow, but it doesn't make a difference what pictures are in there. 
    Muse document.  The arrows are pink and can be seen on the left and right sides.
    Web Browser Preview.  No arrows, even though they're in the Muse document.

    I see that you are using a long page with slideshow in lower section of the page. Navigation arrows are placed around 3200 , so when you will scroll the page down you can view the next and previous buttons.
    Try to change navigation arrows and then check.
    Thanks,
    Sanjit

  • View Navigation (Back and Next)

    Hi Experts,
    Are there any alternatives to using plugs for view navigation in Web Dynpro?
    We have an application which consist of a number of views, each with a 'back' and 'next' button that loads another view. Problem is - depending on choices made on the views, the next and back buttons need to navigate to different views. This means that we have to create separate plugs and links for each possible destination. Even worse, we have to keep track of which view was loaded before the current view, as the back navigation differs.
    If I can maybe illustrate our problem with this example:
    View1:
    InPlug1(Back from View3 after navigating to it from here)
    OutPlug1 (Next button with option A)
    OutPlug2 (Next button with option B)
    View2:
    InPlug1 (Next from View1 with option A)
    InPlug2 (Back from View3 after navigating to it from here)
    Outplug1 (Next button)
    View3:
    InPlug1 (Next from View1 with option B)
    InPlug2 (Next from View2)
    Outplug1 (Back after navigating from View1)
    Outplug2 (Back after navigating from View2)
    For this simple setup we need 10 plugs and we need to keep track of which View navigated to View3. Is there a simpler way or maybe something we could do different somehow?

    Hi,
    Please go through this tutorial.
    It explains how you can pass parameter inside the fire plug and how you can navigate to a view of your choice from a list of views.
    It does not directly address your problem.But then this is possible solution with some intelligent coding.
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/webdynpro?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#4">Navigation using Interface view</a>

  • Just bought an iPhone 5s, as I turned on the phone it showed 71% of battery, I drained it to 15% and next charged it for 3 and a half hours to fully charged. Did I do any mistake ? Should have I let it to get discharged in order to fully charge it ?

    Just bought an iPhone 5s, as I turned on the phone it showed 71% of battery, I drained it to 15% and next charged it for 3 and a half hours to fully charge. Did I do any mistake ? Should have I let it to get discharged in order to fully charge it ? Somebody told me I should have let it discharged and then to fully charge, but I didn't do it, my iphone is working very well, the battery too but I'm worried if the battery lifespan is gonna get worsen soon if I didn't abide by the rules and procedures of battery charging.
    I had problems on my previous iPhone 4s, it died because I didn't replaced the battery with a new one because my battery never worked well and I never knew it , the battery used to overheat my iPhone and it caused to damage my processor completely to death. Who does the replacement of the iphone processor?  I need help how to maintain with the iphone battery. And also let me know if I did something wrong that I should get worried about or not ?!?!

    Apple does not fix the iPhone 4S, they replace the phone. If not covered by warranty, called an out of warranty exchange. Cost is US $199. Make an appointment at any Apple store.
    Be aware, Apple does not sell iPhone parts, thus there is no legitimate source for genuine parts.

  • I need to have endnotes at the end with sections and numbering beginning again for each section. I also need to be able to write Chapter

    I need to have endnotes at the end with sections and numbering beginning again for each section. I also need to be able to write Chapter #s above each section of endnotes. How do I do this, please?

    I have precisely the same problem and am wondering if anyone has found a workaround for what seems to be a bug or an unattended issue in Pages. Hopefully the next update (whenever it arrives, I hope it arrives soon) will take care of this.

  • When I try to sign in to Apps Store it says my computer cannot be verified and to contact support for assistance.

    When I try to sign in to Apps Store it says my computer cannot be verified and to contact support for assistance. Can someone please help me with this?

    Apple ID security issues -
    Call Apple Care for your country and ask for the Account Security Team. They can assist you with your issue.
    http://support.apple.com/kb/HT5699

  • I have itunes match and my phone is still filled with songs and have no room for anything else.

    I have itunes match and my phone is still filled with songs and have no room for anything else. Must be a set up issue since I assumed all songs would be in the cloud and not on my phone.

    Match backs up your music in iCloud, it does not remove it from the phone. It still needs to be on the phone if you want to listen to it.

  • HT201342 Bought an ipad but the seller didn't erase his Apple ID. I don't have his #. I restored it it asked me for a Apple ID I tried to sign in with mine and it asked me for a different Apple ID. What can I do or am I stuck with a non working ipad? Pls

    Bought an ipad but the seller didn't erase his Apple ID. I don't have his #. I restored it it asked me for a Apple ID I tried to sign in with mine and it asked me for a different Apple ID. What can I do or am I stuck with a non working ipad? Pls help.

    The previous user should have done this.
    What to do before selling or giving away your iPhone, iPad, or iPod touch
    http://support.apple.com/kb/HT5661http://support.apple.com/kb/HT5661
    You may have bought a stolen iPad. Or get a refund from the seller.
     Cheers, Tom

  • Please help block my ipod touch second generation and forget the code, try putting the code so many times that now says connect to itunes, I connect but will not let me do anything that tells me this should unlock with key and I should do for Please help!

    please helpme i block my ipod touch second generation and forget the code, try putting the code so many times that now says connect to itunes, I connect but will not let me do anything that tells me this  should unlock with key and I should do for Please help!. thanks

    Place the iPOd in recovery mode and then restore. For recovery mode:
    iPhone and iPod touch: Unable to update or restore

  • Printer is overprinting old jobs on top of new jobs.  Using a Mac with OSx and a HP photosmart for over a year.  this just started happening.

    Printer is overprinting old jobs on top of new jobs.  Using a Mac with OSx and a HP photosmart for over a year.  this just started happening.

    RReset printing system again and the restart in Safe Mode . This will clear some caches,to do this hold down the Shift key when you hear the startup tone until a progress bar appears, after it has fully booted restart normally and add the printer.

  • If I buy a ipad mini with cellular, and not sign up for cellular service, can I use the onboard GPS, or does it depend on the cell signal since it is aGPS

    If I buy a ipad mini with cellular, and not sign up for cellular service, can I use the onboard GPS, or does it depend on the cell signal since it is aGPS?

    Right. But as I understand it, the aGPS is a function that speeds location using cell signals, but isn't necessary for the GPS signal. I can buy a plugin device that is a real GPS that I can use with my iPad mini. However, I would need an app for maps. I was wondering if anyone had used one of these.

  • Navigation back and forth between anchor points with "prev" and "next" buttons?

    Hi all,
    I am working on a horizontal layout site that has anchor points on each part. As the user scrolls, it snaps to each anchor point. It works fine with just the mouse wheel, but I'd like to have previous and next buttons that allow for easy navigation between the points. I know on each section I can have the buttons to jump from say A>B>C and then C>B>A, but this is a single "prev" and "next" set of buttons that are pinned to the page. So, as the page scrolls left to right, the buttons stay put. Is there a way to just have them go to the previous and next point in the line, rather than linking a button to anchor point A/B/C, etc?

    I'm not sure I'm making my question very clear. Your response doesn't address what I'm asking, unfortunately. I know how to make buttons that are linked to individual anchor points. But I'm trying to make buttons to link to the next anchor point, or a specific spot on the page. Think of how you would navigate on a horizontal page, that's what I'm looking to duplicate.

  • Avoiding dropped frames with Matrox and HD Video

    What is the best hard drive configuration to avoid dropped frames when using a Matrox MXo2 mini for HDMI outpjt to a high res monitor/tv? I am experiencing slow performance with the four drives in my Macpro 3,1  3Ghz 30GB Ram  Nividia Cuda card. I am after about 200-250 MBytes/sec transfer speeds. Can I do this with two identical disks in my Macpro and configuring them for Raid 0.  Or do I need to do it externally?  I have increased speed to about 120 MBytes/sec by using a Esata card and connecting into to a Lacie 2TB Big disk,configured for Raid 0 . I need to go a bit faster than this....especially if I want to use premier

    Those are nice looking enclosures and in general I like OWC. I've been using their stuff since before the turn of the century.
    But in this case, I don't think you'll get the speed you're looking for because they are using eSATA and muxing the data over a single cable. It's a flexible solution, but not a very fast one. To re-iterate, the two flaws I see are:
    1. SATA II disk speed, and
    2. a single eSATA cable
    This could theoretically provide 300MB/sec, (they have a benchmark that is around 250) but don't look for it day-in, day-out. As the drives fill up and reality settle in I doubt you'll see the numbers you want. BUT...  maybe it'll provide enough. 
    Instead, take a look here:
    SATA Enclosures - PC PitStop
    Not quite as sassy looking, but I've had the first enclosure shown running with four spindles and a SFF-8470 multilane cable since 2006. And it still benches over 250MB/sec mostly loaded on the original drives.
    Any of the enclosures on that page will support SATA III drives and they offer a variety of controllers.This isn't a big shop but they know what's up. Call them.  I know I can build a RAID with their stuff that will cost about the same as the OWC box and be seriously faster.
    Hope this helps

  • Videos now single frame with audio only

    My 30g video Ipod's videos now show up under music. When I try to watch them they are just a single frame and I get the audio. The videos are fine when viewed with Itunes. How do I get my videos back to normal videos???

    correction: it works fine on my ipod when I have the "TV out" setting set to "off", but I'm only getting audio on my TV when I have the setting "TV out" set to "on." It has worked fine in the past.

Maybe you are looking for

  • Itunes wont open, hpqutils error

    After installing the upgrade (7.1.1) now Itunes will not open. I've tried reinstalling, restarting, etc. but nothing works. When I try to open it I get "File or assembly menu hpqutils or one of it's attributes not found" Any help would be GREATLY app

  • BW upgrade project thinking

    Hello, we plan to upgrade from BW 3.1 to 3.5. We are relative small instalation (2 FI infocubes) Q1/ How long could take - the whole project? - the preparation for this project? - the realization/test phase? Q2/ which capacity should we have for this

  • Rebate  Accruals

    Hi Gurus, I have one issue in Rebate - Accruals are showing correctly at verification level but not capturing in Sales Volume in Rebate Agreement. Please let me know the reason for the same.

  • Off Topic: DAQ 5102 PCMCIA version no longer available / searching for used ones

    Since some time, the DAQ 5102 oscilloscope PCMCIA card version is no longer available from NI. Does anybody know where to buy one. (I already searched ebay for weeks) Or does anybody want to sell ? via ebay ? Please let me know. Thanks. Sorry for thi

  • Harold Gainer

    I have Adobe Photoshop Elements 7.  I have learned to solve some problems with programs by uninstalling and then installing the program.  If I uninstall my Elements 7 program and then install it again  -  will I lose all my pictures?