Updating the Window

I'm new to the GUI field and am having trouble understanding how to update the Container when a button is clicked. I do understand how to create a JPanel, JFrame, Container, and other components and how to use them with ActionListener. But the problem is for example when the user fills in his username and password, then clicks login, the code I have written to validate the information works correctly, but I don't know how to update the Container to show the desired JPanels after that.
I have read many tutorials on the repaint method, but to no help. I'm not even sure if that's the right method to call. Would a JPanel be considered a Graphics object? If someone could please help me understand the logic behind this, I would so greatfully appreciate it. And if you know of a good tutorial for an idiot, please share the wealth. Thanks again.

So lets say I have a JPanel called login, another JPanel called sales, and then a JFrame called userInterface. So the way I'm thinking is when the button in login is clicked it validates the data, then creates an instance of sales and passes sales to a method I have written in userInterface called updateWindow. Where in this method it should add sales to the correct BorderLayout and then call revalidate. Does this seem correct?

Similar Messages

  • Dynamically updating the window title?

    Is there a way to dynamically update the JFrame window title of my program?

    The "substring" method allows you to get any subpart
    of a String (and thus, in effect, "subtract" characters
    from a String).
    Please take a closer look at
    http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html
    Please don't ask every little question.

  • How to update the windows cached password after SSPR?

    Scenario: Windows 7 remote user forgets the cached password for her laptop and uses FIM 2010 R2's Reset Password invoked from the login screen. The domain password change is successful, but the user still cannot login to the laptop as the
    cached password has not been updated.
    Question: How to update the cached windows logon password after SSPR to allow user to login with the new password.
    Thanks 

    Please try the following:
    KB2845626 - Cached credentials are not updated when you change your password in Windows
    If you found my post helpful, please give it a Helpful vote. If it answered your question, remember to mark it as an Answer.

  • HT201320 when I go to do updates the window pops up apple id password I no longer have this email Ive tried to add a new email but the old one is still showing up. I don't know where or what to do now, can you help?

    needing help to change apple id email address. I went in settings and changed the email but the new one isn't showing up Ive called different support numbers and I changed email but it still shows up.

    If you are talking about app updates, these are permanently tied to the Apple ID used to purchase the app, regardless of the ID on your phone in Settings>Store.  The only way to stop the prompt for your older ID would be to delete these apps from your phone.  The ID in Settings>Store is the one being used for current purchases, not updates of apps purchased using a different ID.

  • How to update the Windows on my bootcamp made flash memory?

    Hi,
    Previously Bootcamp helped me to make a flash memory that was an automatic Windows installer along with bootcamp drivers, it went well with installation and I was halppy. Until I noticed strange crashes at Windows and as I trust Apple, I thought it was a crappy Windows image.
    So I recently purchased a newer Windows 7 image and want to try it out and I have two questions:
    1- To prevent downloading 1+ Gb of bootcamp windows driver downloads, how can I make another bootcmap-made Windows installer flash memory with my newer Windows image BUT copy Bootcamp drivers from previous one?
    2- How I should install the new Windows over previous one without corrupting Mac partition and other stuff like MBR?
    Thanks.

    Post here:
    https://discussions.apple.com/community/windows_software/boot_camp

  • Pls. help me friends i have just update the windows 8 on my macbook pro core i7 320 gb 4gb

    but bootcamp ( budeled with mac)  not working     how can i get driver for windows 8
    <Email Edited By Host>

    There are no drivers for Windows 8. Windows 8 has not been released yet. It is a pre-release preview that will likely change prior to final release. Who is going to take the time and effort to write drivers for a product that will likely change soon?
    That said, go to the Boot Camp forums https://discussions.apple.com/community/windows_software/boot_camp and search for Windows 8. There are several posts regarding successful installations using Boot Camp Assistant.

  • HT1338 Every time I try to use software update the window opens to scan then crashes with an error message.

    I am having problems with a BT Yahoo account where the home page opens but it will not let me open e-mail. When you click on mail it takes you to an upgrade page where there is a button for you to continue without upgrading. When you click on that it freezes. To compound this problem I cannot access the upgrade ststem on the Mac itself as it tells me there is an error. I am stuck on 10.3.9 as I purchased a 10.4 upgrade disk (official) ages ago but every time I ran it the computer crashed so I gave up on it. I still require classic on this machine on the odd occassion hence why I am stuck in the past. My iMac runs on 10.6.8 and the mail is accessable on that with no problem. HELP!!

    Start up from that Mac OS X 10.4 disc you have.  Insert disc in optical drive and start up with the C key held down.  On the first Installer screen, from the menu bar, under Utilities, select to run Disk Utility.
    In Disk Utility, select your startup volume (usually "Macintosh HD") in the sidebar and go to the First Aid tab.  Run Verify Disk.  If it reports a problem, that may be the reason for your long-term difficulties. You hard drive volume has data corruption. 
    You can try Repair Disk in Disk Utility.  However, it would be a very good idea to have a backup of the data on that disk, in case the attempt to repair makes the problem worse.

  • Not updated the windows tital

    Hi all,
    could any one help on this..
    In project manager respensibility-> project list->Controler tab
    There is a create textBox when I select issue and click the go button then the header title of the page displayed as Create Issue:Issue, But the client requirement is the header text should be Create :Issue.
    I checked the controler but i did not find where i change.Please find the controler below
    public void processFormRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
    super.processFormRequest(oapagecontext, oawebbean);
    if(oapagecontext.getParameter("copyFromButton") != null)
    String s = "PA_CI_COPY_FROM_LAYOUT";
    OAMessageChoiceBean oamessagechoicebean = (OAMessageChoiceBean)oawebbean.findIndexedChildRecursive("copyFromList");
    String s1 = "";
    if(oamessagechoicebean != null)
    s1 = (String)oamessagechoicebean.getValue(oapagecontext);
    } else
    throw new OAException("CICopyFromCO.processFormRequest: OAMessageChoiceBean copyFromList is NULL");
    PAApplicationModuleImpl paapplicationmoduleimpl = (PAApplicationModuleImpl)oapagecontext.getApplicationModule(oawebbean);
    if(paapplicationmoduleimpl == null)
    throw new OAException("CICopyFromCO.processFormRequest: Application Module is NULL");
    OADBTransaction oadbtransaction = paapplicationmoduleimpl.getOADBTransaction();
    if(oadbtransaction == null)
    throw new OAException("CICopyFromCO.processFormRequest: OADBTransaction is NULL");
    Object obj = oadbtransaction.getValue("paCITypeClassCode");
    if(obj == null)
    throw new OAException("CICopyFromCO.processFormRequest: Item TYPE Class Code(To) is NULL");
    String s2 = "";
    String s3 = "";
    ViewObject viewobject = paapplicationmoduleimpl.findViewObject("ControlItemVO");
    if(viewobject != null)
    Row row = viewobject.first();
    if(row != null)
    Object obj1 = row.getAttribute("ClassificationCode");
    Object obj2 = row.getAttribute("ReasonCode");
    if(obj1 != null)
    s2 = obj1.toString();
    if(obj2 != null)
    s3 = obj2.toString();
    String s4 = getCurrTypeId(oapagecontext);
    String s5 = (new StringBuilder()).append("OA.jsp?akRegionCode=").append(s).append("&akRegionApplicationId=275").append("&paCiClassCodeId=").append(s2).append("&paCiReasonCodeId=").append(s3).append("&paCiTypeClassToId=").append(s4).append("&paCiTypeClassFrom=").append(s1).append("&paCiTypeClassTo=").append(obj.toString()).append("&paProjectId=").append(getCurrProjectId(oapagecontext)).toString();
    oapagecontext.setRedirectURL(s5, false, "RP");
    return;
    } else
    return;
    public void paCreateWebBean(OAPageContext oapagecontext, OAWebBean oawebbean)
    OATableLayoutBean oatablelayoutbean = (OATableLayoutBean)oawebbean.findIndexedChildRecursive("copyFromListReg");
    oatablelayoutbean.setWidth("100%");
    OARowLayoutBean oarowlayoutbean = (OARowLayoutBean)createWebBean(oapagecontext, "ROW_LAYOUT");
    oatablelayoutbean.addRowLayout(oarowlayoutbean);
    OACellFormatBean oacellformatbean = (OACellFormatBean)createWebBean(oapagecontext, "CELL_FORMAT");
    oacellformatbean.setHAlign("end");
    OAMessageChoiceBean oamessagechoicebean = (OAMessageChoiceBean)createWebBean(oapagecontext, oatablelayoutbean, "copyFromList");
    OASubmitButtonBean oasubmitbuttonbean = (OASubmitButtonBean)createWebBean(oapagecontext, oatablelayoutbean, "copyFromButton");
    if(oasubmitbuttonbean != null)
    oamessagechoicebean.setEnd(oasubmitbuttonbean);
    oasubmitbuttonbean.setUnvalidated(true);
    oacellformatbean.addIndexedChild(oamessagechoicebean);
    oarowlayoutbean.addIndexedChild(oacellformatbean);
    setCopyFromPopList(oawebbean, oapagecontext, oamessagechoicebean);
    public void setCopyFromPopList(OAWebBean oawebbean, OAPageContext oapagecontext, OAMessageChoiceBean oamessagechoicebean)
    OAApplicationModule oaapplicationmodule = oapagecontext.getApplicationModule(oawebbean);
    ViewObject viewobject = oaapplicationmodule.findViewObject("ClassTypesVO");
    if(viewobject == null)
    viewobject = oaapplicationmodule.createViewObject("ClassTypesVO", "oracle.apps.pa.util.server.PALookupsVO");
    if(viewobject == null)
    throw new OAException("CICopyFromCO.setCopyFromPopList: lkpVO 'ClassTypesVO' is NULL");
    if(oamessagechoicebean == null)
    throw new OAException("PA", "CICopyFromCO.setCopyFromPopList: poplist 'copyFromList' is NULL");
    viewobject.setWhereClause(" trunc(sysdate) between start_date_active and nvl(end_date_active, trunc(sysdate" +
    viewobject.setWhereClauseParam(0, "PA_CI_TYPE_CLASSES");
    oamessagechoicebean.setListViewObject(oapagecontext, viewobject);
    viewobject.executeQuery();
    Row row = viewobject.first();
    if(row != null)
    oamessagechoicebean.setDefaultValue((String)row.getAttribute("Meaning"));
    oamessagechoicebean.setPickListCacheEnabled(false);
    private String getCurrTypeId(OAPageContext oapagecontext)
    String s = oapagecontext.getParameter("paCiTypeId");
    if(s == null || s.equals(""))
    throw new OAException("CICopyFromCO.getCurrTypeId: Control Item Type ID must be set by the caller of th" +
    "is page"
    } else
    return s;
    private String getCurrProjectId(OAPageContext oapagecontext)
    String s = SessionUtils.getProjectId(oapagecontext);
    if(s == null)
    s = oapagecontext.getParameter("paProjectId");
    if(s == null || s.equals(""))
    throw new OAException("CICopyFromCO.getCurrProjectId: Project ID must be set by the caller of this page");
    } else
    return s;
    }

    Click on "Personalize Page" link which is at the top right corner of the page.
    Select "Complete View" radio button.
    Click on "Expand All" link.
    Search for the header (for which you want to modify title) and click on "Personalize" pensil icon corresponding to the region.
    Modify "Text" property value as Create:Risk at any level(site or organization or responsibility level personalization) as required.
    If this approach does not work then find out all the header bean id's (i.e. Id's of Approval Request,Document Collaboration,Issue,lessons Learnt,Risk).
    Extend controller and in processRequest use below sample code:
    OAHeaderBean bean1 = (OAHeaderBean)webBean.findChildRecursive("HeaderBeanID1");
    bean1.setText(pageContext,"Create :Issue");
    OAHeaderBean bean2 = (OAHeaderBean)webBean.findChildRecursive("HeaderBeanID2");
    bean2.setText(pageContext,"Create :Risk");
    so on..
    For extending controller refer
    http://oracle.anilpassi.com/oa-framework-extending-controller-steps-2.html
    http://oracleanil.blogspot.com/2010/09/controller-extension-r12-oaf.html
    -Anand

  • New Updates for Windows 8.1 in Jan & Feb 2014 crashes the BOOT

    Hi everyone. Please be careful in updating the Windows 8.1 Latest updates that are released in Feb 2014. I guess the update for Windows 8.1 Security Update and Visual Studio Updates crashes down the boot for the Operating System. I reset/refresh the OS again
    and which is working fine when I roll back to the System Restore Point.
    I suggest you to create a manual Checkpoint before you update the OS. So that it will be easy to recover when you failed to boot the OS.
    Perform the Security Updates after that will recover the Store App too.

    Hi,
    Thanks for your sharing, While in may opinion, we couldn't completely sure this problem caused by Windows update, If so, it would have many feedback. Anyway, still thanks for your warm heart.
    Roger Lu
    TechNet Community Support

  • How do webpage developers get Firefox to use the windows.resize or windows.moveTo javascript functions that seem to now be passed over?

    Before V7, this code worked and did as requested every time the page was run. Now, it does not work and no error is reported. Google Chrome and Internet Explorer are able to produce th correct result.
    <script type="text/javascript">
    window.resizeTo(325,700);
    window.moveTo(1150,10);
    </script>
    I have a site where I use window.open to create a login window with minimum chrome.
    On successful login, the window that created the login window updates itself to another page. The login window is supposed to resize itself and move to create a console panel to the right of the screen.
    I have tried to update the window from its parent at the point of successful login (flagged by a database change, checked frequently). I have also included code in the new window itself to resize itself to no avail.
    The new code seems to be failing on both the conditions laid out!

    Some conditions were added in 7.0 to avoid abuse of the resize and move functions:
    #Can't resize a window/tab that hasn't been created by window.open.
    #Can't resize a tab if the tab is in a window with more than one tab.
    * https://bugzilla.mozilla.org/show_bug.cgi?id=565541#c24
    There's still some discussion on the bug - including some solutions and troubleshooting for pages that were affected that shouldn't be - and it's being tracked to make sure it doesn't have any adverse effects.

  • Updating - the best of both worlds

    Hi,
    Ive had a look through a lot of the topics in this forum, though nobody seems to have wanted to do exactly the same as me.
    My application has quite a few lengthy operations that are perfomed as part of an actionPerformed event. Im focusing on one particular event at the moment, but it will apply through my app (in about 8 places) so i need to get it right!!
    If I dont put these methods in their own thread they will display their results after the operation, which is only a problem in that the app looks like its crashed (ie there is no update). So i placed them in their own thread, however this means that the user can keep starting these threads which causes massive headaches!!
    What i actually want to do is suspend the event queue, until the operation is complete, but still update the windows, so the user can see that something is happening. In effect I want the effect of not putting the operation in a seperate thread (suspending the event queue), with the effect of doing this (a nice updated window).
    Anybody know a way around this.
    Steve

    private boolean wait = false;
    public void waitForSomeOperationToBeDone() {
       synchronized(getTreeLock()) {
           wait = true;
           while(wait) {
              try {
                 getTreeLock().wait();
              } catch(Exception e) {
                  break;
    public void awake() {
       wait = false;
       synchronized(getTreeLock()) {
           getTreeLock().notifyAll();
    }This usually does the trick for me, but it can fail sometimes. Try it...
    It worked for me when I made a modal JWindow.
    Nille

  • Problems after updating to window 8.1

    I have a notebook Lenovo G510, I7. My problem is that when I update the windows system to windows 8.1, the system becomes instable. A lot of bug happens !!! Any help ???  Thank you in advance.

    What was your previous installation?If you had windows 8 ,using the windows reset option would allow you to go back to windows 8
    More here
    http://windows.microsoft.com/en-US/windows-8/restore-refresh-reset-pc
    Cheers and regards,
    • » νιנαソѕαяα∂нι ѕαмανє∂αм ™ « •
    ●๋•کáŕádhí'ک díáŕý ツ
    I am a volunteer here. I don't work for Lenovo

  • Windows 8 Update to Windows 8.1 Issue

    HI
    I have try to update the windows from 8 to 8. When I click on update download its showing as downloading and shows 0%. I have waited for 4 hrs but the status was the same. Kindly provide a solution for the same. I am using windows 8 pro version.
    Expecting a quick resolution from your end.
    Thanks & Regards
    Abhilash K Joy

    Hi,
    What does your mean by "Update download"? Is this Windows update or Store update for Widnows 8.1 upgrade?
    For your situation, it is probably network problem, please restart your computer or use Windows update troubleshooter to fix this problem for test.
    Control Panel\All Control Panel Items\Troubleshooting\All Categories
    Roger Lu
    TechNet Community Support

  • Updating the VM Template

    Hello All,
    We're using SCVMM 2012 R2 with UR5.
    If I want to update the Windows of any template VHDX, I have to attach it with a new VM, then I have to manually run Windows Updates. Then detach the VHDX from VM. Then place it in the VMMLibrary. It's very hectic and I've to do it every month.
    Is there any method I can use to automatically update the VHDX.
    Will Virtual Machine Servicing Tool (VMST) 3.0 help me? I've tried it yet, but I read that it's not supported with SCVMM 2012 R2.
    Please help and advice.
    Thank you.
    Regards,
    Hasan Bin Hasib

    Hi Sir,
    In addition , please refer to following article regarding offline patch :
    http://blogs.technet.com/b/heyscriptingguy/archive/2010/11/14/use-powershell-to-patch-vhd-and-wim-image-files.aspx
    Best Regards,
    Elton Ji
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected] .

  • My new 8th gen iPod nano is 'not recognized' by my computer. My computer runs on Windows 7, and I've installed and updated the latest versions of itunes etc, but still to no avail! I've tried different usb ports, troubleshooting...

    My computer runs on Windows 7, and I've installed and updated the latest versions of itunes etc, but still to no avail! I've tried different usb ports, troubleshooting, etc... But it still says "One of the USB decuces arrached to this omputer has malfunctioned and windows does not recognize it".
    The iPod is brand new, sent to me by Apple as part of the 1st gen replacement programme. I've been using the cable that came with the 1st gen iPod (I bought the first gen second hand) It always worked on my computer with the 1st gen iPod. So I was wondering, do you think I need to replace my cable in order for my PC to recognize my iPod or is it something else?
    Thanks

    Try a different cable. And are you connecting directly to your computer or through a USB hub?

Maybe you are looking for

  • Problem getting started weblogic server (for BI Publisher)

    Hello, I am trying to run services BI publisher But I can't because I have the following error: SVR_GRP = JAVA Memory arguments: -Xms256m -Xmx1024m WLS Start Mode=Production CLASSPATH=C:\BI11\ORACLE~1\modules\oracle.jdbc_11.1.1\ojdbc6dms.jar;C:\BI11\

  • VBScript Error when trying to install iTunes 7.2 on Windows Vista PC

    I downloaded iTunes v7.2 + Quicktime. When I try to install, I receive the following error: "iTunes could not be installed because Visual Basic Script (VBScript) is not installed or has been disabled. Make sure VBScript is installed, turn-off script

  • HT1711 how can i erase music off of my ipad2

    ive been trying to figure this out for the longest and i really need answers

  • Want to create a small Movie to play on ipod

    Hallo I want to create a small Movie-file to play on my iPod, but I don't want to use the quite large Standard iPod-Format. What other choices do I have? I tried MPEG4, but it didn't play. I produce a Videopodcast, and want to keep the size small, an

  • Dry loop DSL without 1 yr contract

    I was wondering if fry loop DSL is available without 1 yr contract. I checked dry loop is available in my area. The weird thing is when I called customer service this lady called Bela from retention department said it is avilable only with 2 yr contr