Automatic Refresh of JComboBox Implementation

After the user logs in the "Student Management System" using "system" and "password" you get to view Student details. Also you get to choose a Student to delete or modify from the Combo box on the right hand top. When I select a student and delete using the delete button it gets deleted in the databse but how do i autorefresh the same in the Select student combobox...
I was not able to implement it...The code needs to be implemented in the ButtonHandler Classs. The snippet is as shown below
else if(s.equals("DELETE")){
                              int returnValue  = JOptionPane.showConfirmDialog(null, "Delete Confirmation",
                                                       "Are you sure you wanna delete", JOptionPane.YES_NO_OPTION);
                              if(returnValue == JOptionPane.YES_OPTION){
                                   selectedStudentname = jcmbStudentName.getSelectedItem().toString();
                                   String student_regNo= selectedStudentname.substring(0,7);
                                     deleteStudentRecord(student_regNo);
/*               JCOMBOBOX Refreshing Student Combo logic not implemented yet                    
*                jcmbStudentName.addItem("Select Student Name");
                                  PopulateStudentCombo();*/
/code]
Note:  PopulateStudentCombo() is a function used to populate the ComboBox.
The entire code for the above project is available at
[url] http://www.java-swing-tutorial.com/student.zip [/url]
Database Created in Oraclecreate table student_details (
     reg_no VARCHAR(30),
     name     VARCHAR(30),
     address     VARCHAR(50),
     fname     VARCHAR(30),
     dob     VARCHAR(30),
     phone     INTEGER,
     gender     VARCHAR(2),
     year     VARCHAR(30),
     course     VARCHAR(30),
     degree     INTEGER,
     charcert INTEGER,
     ncccert     INTEGER
create table student_login (
     login VARCHAR(30),
     password VARCHAR(30)
insert into student_login values('system', 'password');
These are the Database Specific settigns for JDBC
static String userid="scott", password = "tiger";
static String url = "jdbc:odbc:bob";     

You have to manually remove the item from the combo box. Read the API. There are a couple of "remove..." methods you can use.

Similar Messages

  • Automatic refresh in the inbox.

    Hi There,
         We have implemented a new workflow project. Work items are not being refreshed automatically when the user comes back to the inbox.
    Is there any way we can automatically refresh the inbox.
    Joe Vellaiparambil

    Hi Joe,
    normally the inbox is refreshed automatically when you enter.
    We found the program that is called when you enter the inbox.
    Here you can add additional code.
    Function module: SINWP
    subroutine: append_folrg_to_tree
    Best regards,
    Werner.

  • Automatic refresh requisition status overview in MSS e-recruiting

    Hi guys,
    We are implementing e-recruiting 6.0 and de MSS functionality to request a requisition with approvals. The manager can see his/her requests in the requisition status overview to follow-up. If we create a new requisition, the list is only updated with this after you close the browser and log back in in the portal. Is there any way to activate the automatic refresh of this list?
    Thanks
    Karolien

    Nilesh,
    iam working on setting up E-rec in stand alone scenario.
    While we have been able to setup the workflow in MSS up to approval of Extended req. request, i could not see the recruiter getting the requisition to release and publish it.
    Can u pls, send some documentation you have to the below mail address
    raaj333 at rediffmail dot com
    Thanks
    G RAJ

  • Automatic Refresh of Shopping Cart POWL

    We are running SRM 7.0.
    When a user accesses their POWL of shopping cart data, the POWL query is not automatically refreshed.  Is there a batch program or configuration setting that will allow a POWL query to be refreshed every time the user accesses that particular query?
    Thanks,
    Paul

    Hello,
    POWL is a static functionality, the refresh doesnt happen automatically. User must click on "refresh" button in order to get the screen refreshed.                                                                               
    There is the consulting note 1134640, which has a document SRM_POWL_RefreshClickOnQuery.pdf attached. This note implements the functionality to refresh the POWL when clicking on query name.                     
    If you want you can apply this note, but this is a consulting note, not the standard.                                                                  
    Kind regards,
    Ricardo

  • Automatic Refresh of Purchase Order Worklist (POWL) needed

    Hi,
    We are running SRM6.0 on EP7 SP14 Portal.
    After saving (hold) a newly-created shopping cart, the user must manually click "Refresh" to see the new shopping cart inside the Purchase Order Worklist (POWL).  Most casual users do not anicipate needing to do this Refresh.  They don't see the new cart, and they many times create a second duplicate cart.
    Shopping carts are created in a popup window above the POWL, and apparently there is no communcation back to the POWL to automatically refresh upon adding a new shopping cart.
    Is there a way to configure/change SRM6.0 such that it automatically invokes the POWL Refresh action after create a shopping cart?
    Thanks
    Kevin

    Hi
    Just try this
    A.  IF You have launched the shopping card POP-up from the WD which embeds POWL using POWL_FOLLOW_UP
    1 Add a public attribute in the component controller l_refresh_needed.
    2 When you create a shopping cart in pop-up you set the flag
    l_refresh_needed = abap_true.
    3 Now you must be having an outbound plug to POWL let's say plug1 from your WD view. You write a code in DOMODIFYView or DOAFTERACTION of the view which has the outbound plg.
    You need to check the flag l_refresh_needed and fire the same navigation plug plug1 to POWL with refreshq = 'X'.
    B. If you have launched the POP-up from the detail component of the POWL,
    then you must fire the event do_refresh which you get when you implement POWL_DETAIL_COMP_IF.
    but before firing do_refresh you have to clear the messages from the message manager and after refresh trigger you can again put the messages back into the message manager of WD.
    Let me know if it helps.
    Vineet

  • Automatic refresh of BSP page with certain intervals  like 10 mins once

    Hi all,
    I am writing a BSP page ,which reads my table data and display.
    The table data will be automatically getting changes every 10 mins, based on the BGD job.
    I want my BSP page alos automatically refresh every 10 mins...
    Is it possible?
    Please help.
    Thanks in advance.
    Ram

    Hi
    Try this
    window.setInterval("autosave()",30000);
    and also go through this link
    [Auto Refresh|Self-refreshing BSP ?;
    [Auto Save|Re: Auto Save Functionality to be implemented]
    Regards
    Arun
    Edited by: Arun Padmanaban on Mar 21, 2009 10:01 AM
    Edited by: Arun Padmanaban on Mar 21, 2009 10:03 AM
    Edited by: Arun Padmanaban on Mar 21, 2009 10:06 AM

  • Is there a way to automatically refresh a webpage in Firefox 3.6.10?

    hi there,
    I am hoping the Firefox team can help with a small problem, is there a way of automatically refreshing webpages within Firefox 3.6.10 and 4.06 beta? We are building an interesting website at the moment and the client is using Firefox 3.6.10to view the site. Each time they go onto the new website to see the changes we have done, they are shown old pages. We need to rectify this problem as quickly as possible, for our client without requesting that they refresh the page each time they go onto the site.

    You can do that by changing a hidden preference.
    # Type '''about:config''' into the location bar and press enter
    # Accept the warning message that appears, you will be taken to a list of preferences
    # In the filter box type '''browser.cache''' to bring up a small number of preferences
    # Double-click on the preference '''browser.cache.check_doc_frequency''' and change its value to '''1'''
    For more details on that preference see http://kb.mozillazine.org/Browser.cache.check_doc_frequency

  • When I sign into or out of Gmail - many other pages automatically refresh. How do I stop this?

    I hate automated things, when it's NON consensual and it's part of some automated bullshit trip.
    I might have half finished texts on the other open tabs, or what ever, but it's MY bandwidth to chew up on things I see fit, not the people of Mozilla, or Google or whoever.
    And while the account page is gmail, that I am signing into or out of, the other pages are NOT google pages either.
    I think the designers of the "refresh / automatic refresh" should be shot - because the reason I have a PAGE (tab) open, is because I want to access THAT page, and not a later version of it...
    This auto-reload / refresh of some tabs absolutely annoys the piss out of me, because I did not ask for it, and there is NO apparently easy up front way to stop it from happening - which I also think is one of the best way to alienate users of a product - by building in a host of idiot functions with NO control over them.
    So how do i stop this from happening?

    ''the-edmeister [[#answer-690349|said]]''
    <blockquote>
    That may be happening for websites that participate in Google+. ''IOW, Google+ knows about a lot of things you use on the internet; like they're following you around.'' You may want to check those websites to verify that they are connected with the Google+ program, or not. ''In that case, my hypothesis is incorrect.''
    I think what happens is that you sign in at Gmail, which is a Google+ sign-in these days, and all the other web pages that participate in the Google+ program somehow "sense" that you have just logged into Google+ and reload their page to reflect that you are nowlogged into the Google+ program. Google+ was originally an "option" at Gmail, but that ended not to long after Google+ came about - like within 6 months or so.
    http://www.google.com/intl/en/+/learnmore/better/
    One solution is to stay logged into Google+ / Gmail all the time. Another is to transition away from Gmail over time and use a different web-mail platform instead; and eventually stop using Gmail altogether.
    </blockquote>
    Yeah this is sounding like "THE PROBLEM" and what drives it. However, the solutions you have offered are not "solutions", in that they do not "FIX" the issues, they merely circumvent or bypass them.
    Since I can't go punch Eric Schmitt on the nose for being a nazi prick, and send him the bill for wasting my internet data, I want to stop the collusive programming practices of the people from Mozilla and Google - from operating my computer, contrary to my mandates. i.e. It's my computer and I am paying for my bandwidth." - I have total say so about what I allow to go on, not anyone else.

  • I want to prevent open websites from automatically refreshing.

    I work with many tabs open at the same time during my work day. I wonder if the fact that they automatically refresh frequently is a factor in slowing Firefox. How can I disable the automatic refresh? I do not with to close and reopen as they all require logins and it takes too much time.

    Sorry, it looks that my reply above ended up in the wrong thread.
    I'm not aware of a way to prevent automatic refresh if the page uses JavaScript to achieve this.
    It is also possible to do this via a meta refresh tag.
    In some cases this extension can help.
    *RefreshBlocker: https://addons.mozilla.org/en-US/firefox/addon/refreshblocker/
    It doesn't work with refresh done via JavaScript as will be used in most cases these days.

  • Automatic refresh of photo order when changing photo titles in iPhoto 9.6

    I've just moved from an older version of iPhoto to 9.6.
    In the previous version, when you changed the title of a photo (within an event), the sort order of the photos was automatically and immediately updated.  In 9.6 it isn't - I have to do View - Sort Photos then select another sort criteria (e.g. date), then do this again for title, to get the photo order to refresh.
    Does anyone know if I am I stuck with this new (retrograde) behaviour, or if there's a way to get iPhoto 9.6 to automatically refresh the photo order?
    Otherwise, is there a keyboard shortcut for refreshing the photo order, or for changing the view - sort photos criteria?
    Thanks in advance for any help!

    It will resort if you leave the Event (click All Events button) and then go back.  Not a good solution but quicker IMO than using the View ➙ Sort menu method. 
    Be sure to send a bug report to Apple via http://www.apple.com/feedback/iphoto.html.

  • UWL: No automatic refresh after completing workitem in iView

    Hi,
    our system is EP 6 SP2 P4 HF 7 with CM HF 6.
    We have configured a workitem launched by an individual iview - this works fine.
    For execution of this workitem we call SAP_WAPI_CREATE_EVENT and save values in simple_container. After this SWW_WI_ADMIN_COMPLETE is called to complete the workitem to be cleared from UWL inbox.
    If I refresh the tab manual all works fine - the completed workitem is not more there. But with automatic refresh this executed workitem is still listed.
    Do you have any idea what we are doing wrong?
    Configuration in uwl.standard:
      <Views>
        <View name="myWorkItemView" selectionMode="SINGLESELECT" width="98%" supportedItemTypes="uwl.task.webflow.DE9_TS99500153" columnOrder="detailIcon, subject, priority, creatorId, createdDate, dueDate" sortby="createDate:descend, priority:descend" tableDesign="STANDARD" visibleRowCount="20" headerVisible="yes" tableNavigationFooterVisible="yes" tableNavigationType="CUSTOMNAV" actionRef="" refresh="60" dueDateSevere="86400000" dueDateWarning="259200000" emphasizedItems="new" displayOnlyDefinedAttributes="yes" actionPosition="top">
    I appreciate your help,
    thanks in advance,
    Thorsten Bingmann

    Hi Ross,
    concerning our problem (no WI completion by auto refreshing UWL) we have yet no solution. SAP Support told us to configure the cache lifetime of UWL to smaller size, but alas this does not solve the problem.
    As you mentioned the blank webgui screen: I think this behaviour is by design. Calling an ITS transaction there's no other way to end the ITS session as of using the back or return button and get an end of session. The given status (WI new status: completed) indicates that UWL and ITS process the WI correct.
    A smarter way to execute the concerning WI ID is to configure it in the xml file as generic decision task. Then you'll get an inline rendered java iview with decision "accept" or "decline" and the new status will be shown in UWL. This will take place of (standard) ITS configuration. Please have a look at the HowTo Guide of UWL.
    Hope it helps,
    regards,
    Thorsten Bingmann

  • My aol inbox does not automatically refresh and display new messages in firefox, but it does in google chrome. How do I fix this?

    I have been trying to update settings to allow my aol mail to automatically refresh when new messages come in, vs having to click on the "inbox" in order to view new messages. I followed aol's troubleshooting steps to allow for this, and I finally got it to work in google chrome... but it will not automatically refresh in firefox. can you please help? thanks!

    Which troubleshooting steps did you get?

  • Automatically refreshed workspace and changes into LIVE

    Hi,
    I've noticed that changes made directly into LIVE
    are immediately visible to automatically refreshed
    child workspaces. However the answer to the FAQ
    question "When sharing changes made in a child
    workspace with another child workspace, should I
    use periodic (manual) or continually (automatic)
    refresh?", states that this type of change must
    be refreshed manually.
    What is the expected behaviour afterall?
    Regards,
    Karina Borges

    Karina,
    For continually refreshed workspaces, changes made in the LIVE workspace will be immediately visible.
    For non-continually refreshed (NCR) workspaces, the changes are not immediately visible - to see the changes, NCR workspaces have to be manually refreshed.
    We will update the FAQ to make this point clearer.
    regards,
    - Ramesh.

  • Outlook 2007: unable to automatically refresh calendar

    Hello,
    With Outlook 2007 and OCFO 10.1.3.10 we can't get outlook to automatically refresh the calendar view so that events inserted in another client (i.e. same user on the web client or on the native ocal client, or another user) are seen.
    Tools->Refresh Selected Folder(s) causes the events to turn up (eventually).
    I've set the server refresh interval to 3 minutes, but despite several mail refreshes, I'm not getting any calendar refreshes.
    Has anyone any ideas on how to get this working?
    Tom.

    Hello
    there is also a setting on the server side (several actually)
    Have a look at these pages
    - in user.ini
    http://68.142.116.68/docs/cd/B25553_01/calendar.1012/b25486/user_res_params.htm#sthref22
    - in unison.ini
    Metalink note 461204.1
    Hope it helps

  • Materialized View - creation and schedule (To automate Refresh)

    Hi All,
    I have one table based on SQL Query (multiple tables) and loading data every day through procedure.
    When I execute the procedure is taking lot of time to load data. That’s why I am planning to create Materialized view to refresh the data in a table every day at some point of time (ex:-9.00 am).
    Exclude procedure and materialized view are there any ways to refresh the data?
    Can you and all please help me to create materialized view and schedule (Automate refresh).
    begin
    insert into CLAIMS_PRODUCT_TAB
    select
    substr(at.ATN_VOUCHER_NUMBER,1,6) as BRANCH,
    t.MONTH_NAME as MONTH,t.FISCAL_YEAR as YEAR,
    bb.ACC_ACCOUNT_TYPE as TYPE,
    aa.ACC_DEPARTMENT_CODE as DEPT,
    pr.PRODUCT_NAME as PRODUCT,
    case bb.ACC_ACCOUNT_TYPE when '1301' then 'Claims Paid' when '5383' then 'Claims OS' end as HEAD,
    case aa.ACC_DEPARTMENT_CODE when '31' then 'OD' when '32' then 'TP' when '39' then 'TP Pool' end as DEPT_NAME,
    count(distinct at.CLAIM_ID) as CLAIMS,
    --count( distinct at.POLICY_ID) as POLICIES,  
    sum(atd.ATD_CREDIT_AMOUNT - atd.ATD_DEBIT_AMOUNT) as totals
    from
    ACCOUNTING_TRN_DETAIL atd,time t,
    ACCOUNT bb,
    ACCOUNT aa,claim c, policy p,product pr,
    accounting_transaction at
    where bb.ACC_ACCOUNT_ID = aa.ACC_ACC_ACCOUNT_ID
    and at.CLAIM_ID = c.CLAIM_ID
    and c.POLICY_ID = p.POLICY_ID
    and p.PRODUCT_ID = pr.PRODUCT_ID
    and aa.ACC_ACCOUNT_ID = atd.ACC_ACCOUNT_ID
    and atd.ATN_ACCOUNTING_TRANSACTION_ID = at.ATN_ACCOUNTING_TRANSACTION_ID
    and trunc(at.ATN_TRANSACTION_DATE) = t.CAL_DATE
    and (bb.ACC_ACCOUNT_TYPE in ('1301','5383'))
    group by substr(at.ATN_VOUCHER_NUMBER,1,6)
    ,t.MONTH_NAME
    ,t.FISCAL_YEAR,bb.ACC_ACCOUNT_TYPE
    ,aa.ACC_DEPARTMENT_CODE
    ,pr.PRODUCT_NAME
    , case bb.ACC_ACCOUNT_TYPE when '1301' then 'Claims Paid' when '5383' then 'Claims OS' end
    ,case aa.ACC_DEPARTMENT_CODE when '31' then 'OD' when '32' then 'TP' when '39' then 'TP Pool' end );
    end;
    Thanks and Regards
    Venkat

    Is the MV and the source tables on the same database? If this is a remote MV, then check the source site if there are any issues (TEMP, UNDO space issues).

Maybe you are looking for