Problem in refreshing Frame

Hi,
i'm using internal frames for a program.And to this Internal Frame i add a panel with some buttons.
From the menu i choose the number of buttons-(for that i have a dialog box).
My problem is :
1. after i dispose the dialog box the internal frame is empty and only when i click on it the new number of buttons show up.
2.Now when i attempt to change the number of buttons for the second time - even after i click the empty frame nothing shows up !
in my code :
Clicking the OK button in the dialog box for selecting the number of buttons -
action performed has :
levels.dispose() ;
MainGameFrame.updateGUI();
and updateGUI code is :
public static void updateGUI()
          innerFrame.remove(gameboard);
          gameboard = GamePanel.getGamePanel();
          innerFrame.add(gameboard);
          innerFrame.repaint();
          innerFrame .setVisible(true);
where am i wrong ? pls let me know !
its very confusing !

You need to find out about invalidate and validate.
All components know when they have been painted. So
o a repaint tells a component "paint yourself" which
results in an "already done matey". If you
invalidate a component you effectively shout "you
look like you've been dragged through a hedge." This
should result in a proper repainting. It is not easy
because there are trees of components and I think you
have to hit the appropriate leafs. If you can't do
it then I will read about the topic and try to give
some better guidance.Hi Thanks for the effort...
I got it working now....instead of removing the components of the internal frame i removed the internal frame itself and then added it again with the changes!

Similar Messages

  • Problem in refreshing the data of the UI element Table

    Hi Experts,
    I am having a problem.
    I have a screen which displays list of variants in table ( variant name , variant desc )
    I am binding the entries of table in WDDOINIT method.
    but when i go back to selection screen view and come back to display variants view, WDDOINIT is not triggering.
    Now if i move the code written in WDDOINIT method to WDDOMODIFYVIEW method, its not retaining the lead selection as the binding happens on every server round trip. if i check with First_time = 'X'. its same as that of having it in WDDOINIT method.
    How do i overcome this problem of refreshing the table data.
    any clue is highly appreciated.
    Regards,
    Ajay

    hi Ajay ,
    create a custom controller for this and when u want to move from selection screen view to display variant ,
    call method of this custom controller
    DATA lo_edit TYPE REF TO ig_edit .
    lo_edit =   wd_this->get_edit_ctr( ).
      lo_edit->edit1(
    here I am calling the edit1 method of my custom controller named EDIT.
    try to move code of ur WDDOINIT here.
    it shud help
    rgds,
    amit

  • Problem with refresh of snapshot

    I am facing one problem with refresh of a snapshot. In the front end (developed in D2K) there is a PL/SQL code written which loops through user_snapshots and refreshes each snapshots one by one.
    With one particular snapshot its giving the error. I traced the session and found the problematic snapshot. I tried to refresh the same snapshot with some other user with DBA role granted to it and its working fine.
    Now I logged in to SQL Plus with the user Z0000 ( This is the user with which the application user logs in to the application) and tried to rerfresh the snapshot. Its giving me ORA-03113 end-of-file on communication channel. Then I granted DBA role to user Z000 and then tried to refresh its again giving the same error.
    I tried with many different users and its working fine.
    Any ideas where could be the problem.
    Thanks
    Sidhu
    Database is 10gR2 on AIX 5.3
    Message was edited by:
    Sidhu

    Hi,
    did you try to do it locally?
    Maybe a possible problem on the network.
    This issue remembers me a bug on older versions.
    It is strange on a 10.2
    Acr

  • Problem in refreshing JTree inside Jscrollpane on Button click

    hi sir,
    i have problem in refreshing JTree on Button click inside JscrollPane
    Actually I am removing scrollPane from panel and then again creating tree inside scrollpane and adding it to Jpanel but the tree is not shown inside scrollpane. here is the dummy code.
    please help me.
    import javax.swing.*;
    import java.awt.*;
    import javax.swing.tree.*;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import java.awt.event.WindowListener;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    public class Test
    public static void main(String[] args)
         JFrame jf=new TestTreeRefresh();
         jf.addWindowListener( new
         WindowAdapter()
         public void windowClosing(WindowEvent e )
         System.exit(0);
         jf.setVisible(true);
    class TestTreeRefresh extends JFrame
         DefaultMutableTreeNode top;
    JTree tree;
         JScrollPane treeView;
         JPanel jp=new JPanel();
         JButton jb= new JButton("Refresh");
    TestTreeRefresh()
    setTitle("TestTree");
    setSize(500,500);
    getContentPane().setLayout(null);
    jp.setBounds(new Rectangle(1,1,490,490));
    jp.setLayout(null);
    top =new DefaultMutableTreeNode("The Java Series");
    createNodes(top);
    tree = new JTree(top);
    treeView = new JScrollPane(tree);
    treeView.setBounds(new Rectangle(50,50,200,200));
    jb.setBounds(new Rectangle(50,300,100,50));
    jb.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent ae)
              jp.remove(treeView);
              top =new DefaultMutableTreeNode("The Java ");
    createNodes(top);
              tree = new JTree(top);
                   treeView = new JScrollPane(tree);
                   treeView.setBounds(new Rectangle(50,50,200,200));
                   jp.add(treeView);     
                   jp.repaint();     
    jp.add(jb);     
    jp.add(treeView);
    getContentPane().add(jp);
    private void createNodes(DefaultMutableTreeNode top) {
    DefaultMutableTreeNode category = null;
    DefaultMutableTreeNode book = null;
    category = new DefaultMutableTreeNode("Books for Java Programmers");
    top.add(category);
    book = new DefaultMutableTreeNode("The Java Tutorial: A Short Course on the Basics");
    category.add(book);
    book = new DefaultMutableTreeNode("The Java Tutorial Continued: The Rest of the JDK");
    category.add(book);
    book = new DefaultMutableTreeNode("The JFC Swing Tutorial: A Guide to Constructing GUIs");
    category.add(book);
    book = new DefaultMutableTreeNode("Effective Java Programming Language Guide");
    category.add(book);
    book = new DefaultMutableTreeNode("The Java Programming Language");
    category.add(book);
    book = new DefaultMutableTreeNode("The Java Developers Almanac");
    category.add(book);
    category = new DefaultMutableTreeNode("Books for Java Implementers");
    top.add(category);
    book = new DefaultMutableTreeNode("The Java Virtual Machine Specification");
    category.add(book);
    book = new DefaultMutableTreeNode("The Java Language Specification");
    category.add(book);
    }

    hi sir ,
    thaks for u'r suggession.Its working fine but the
    properties of the previous tree were not working
    after setModel() property .like action at leaf node
    is not working,I'm sorry but I don't understand. I think you are saying that the problem is solved but I can read it to mean that you still have a problem.
    If you still have a problem then please post some code (using the [code] tags of course).

  • Wwsto_api_session: problems on refresh

    Hi,
    I have a portlet [pl/sql based].
    In package of this portlet (procedure show) I am working with the session objects:
    1. Load the session object, using load_session method.
    2. Manipulate the attributes of the session object by using the set_attribute methods.
    3. Save session, using save_session method.
    Then I access the portlet for the first time.
    But on refresh page,which include the portlet, and procedure show of the portlet executes, the session variables are null.
    Please, help me!
    Sorry for my English, Sergei

    Hi!
    Addition to previous queston "wwsto_api_session: problems on refresh"
    Does anybody can help me?
    Oracle 9 iAS R2
    procedure show(...);
    declare
    l_session portal.wwsto_api_session;
    counter number ;
    begin
    l_session:=portal.wwsto_api_session.load_session('domain','subdomain');
    counter:=l_session.get_attribute_as_number('counter');
    htp.p('counter='||counter);
    counter:=counter+1;
    l_session.set_attribute('counter',counter);
    l_session.save_session;
    end;
    end;
    Text of the procedure got from books, oracle guides.
    What's wrong?
    Sergei.

  • Problem in refreshing

    Hi ,
    i am facing a problem of refreshing a query.
    my query is using a user inputn variable for fiscal yr and on the basis of fiscal year it return a variable say 01.04.2007-30.04.200 .
    but the problemm is wen i first enter the value of fiscal year in query it shows perfect data but as soon as i change the value of variable let say if i make it 2006 from 2007 it gives me the same data its not refreshing the data plz letme know y is it happning,
    thnks

    hi m refreshing it ..still
    WHEN 'ZC00000N25'. " variable
        LOOP AT i_t_var_range INTO loc_var_range
          WHERE vnam = '0P_FYEAR'. " fiscal variable
          CLEAR l_s_range.
          l_s_range-low(4) = loc_var_range-low(4) + 1  .
          l_s_range-low+4(4) = '0101'   .
          l_s_range-sign = 'I'.
          l_s_range-opt =  'BT'.
          l_s_range-high(4) = loc_var_range-low(4) + 1.
          l_s_range-high+4(4) = '0331'.
          APPEND l_s_range TO e_t_range.
           CLEAR : l_s_range , i_t_var_range.
          EXIT .
        ENDLOOP .

  • Problem of refreshing a tree in web dynpro java

    hi all,
    I'm facing a problem for refreshing a tree in web dynpro java for SAP HR.
    I created a viewset with 2 cells( 1 view for each).
    In the 1st view I created a droplistbyindex to select the unit ID and in the 2nd view ( defaut=false)  I called a method to populate my tree according to my selection in the 1st view ( method called in wdInit).
    When I make the first selection everything is ok.
    But when I select another unit ID, the tree is not changed and I know the context is well changed according to my selection.
    So I think the method is executed only the first the view is called.
    In this case, how can I refresh my tree on real-time?
    Thanks for your help
    Yimin

    May be u can write the code wdDoModify instead.
    -Ashutosh

  • Problem in refreshing popup

    ADF11g :
    I have problem in refreshing popup.
    On main page there is one table and in one column of that table i put commandImageLink .on click of that image i supposed to open one popup where i am displaying info result.
    on first click of that image i am able to show result correctly but if i change the row and try to click image again i am not able to show new result .it is showing old one.Onclick i checked new result values are retrived by server but not reflecting on popup.
    One more thing which i observerd is that at first time when i click image it goes to action method and then open popup but at next click it opens popup fisrt and then call action method.
    <af:column sortable="false" headerText="Actions"
    rendered="true" width="50">
    <af:panelGroupLayout layout="horizontal">
    <af:commandImageLink icon="/image/info.jpg"
    shortDesc="Info"
    partialSubmit="true" action="#{IssueActionBean.refresh_ContentRevisionInfo1}"
    launchListener="#{IssueActionBean.getRevisionLauncherListener}">
    <af:showPopupBehavior popupId="::popupinfo"
    triggerType="click"/>
    </af:commandImageLink>
    <af:commandImageLink icon="/image/checkinout.jpeg"
    shortDesc="Check in/out">
    <af:showPopupBehavior popupId="::popupMenu"
    triggerType="action"
    align="beforeStart"/>
    </af:commandImageLink>
    </af:panelGroupLayout>
    </af:column>
    </af:table>
    <af:popup id="popupinfo" popupFetchListener="#{IssueActionBean.getfetchRevisionLauncherListener}">
    <af:panelWindow title="Content Information"
    inlineStyle="width:600px; height:500px;">
    <af:table value="#{bindings.documentRevisions.collectionModel}"
    var="row" id="popupinfo1"
    rows="#{bindings.documentRevisions.rangeSize}"
    emptyText="#{bindings.documentRevisions.viewable ? 'No rows yet.' : 'Access Denied.'}"
    fetchSize="#{bindings.documentRevisions.rangeSize}"
    selectedRowKeys="#{bindings.documentRevisions.collectionModel.selectedRow}"
    selectionListener="#{bindings.documentRevisions.collectionModel.makeCurrent}"
    rowSelection="single"
    inlineStyle="width:750px; height:250px; margin:20px;">
    <af:column sortProperty="revLable" sortable="true"
    headerText="#{res['contentInformation.revision']}">
    <af:outputText value="#{row.revLable}">
    <af:convertNumber groupingUsed="false"
    pattern="#{bindings.documentRevisions.hints.revLable.format}"/>
    </af:outputText>
    </af:column>
    <af:column sortProperty="releaseDate"
    sortable="true"
    headerText="#{res['contentInformation.rDate']}">
    <af:outputText value="#{row.releaseDate}">
    <af:convertDateTime pattern="#{bindings.documentRevisions.hints.releaseDate.format}"/>
    </af:outputText>
    </af:column>
    <af:column sortProperty="expirationDate"
    sortable="true"
    headerText="#{res['contentInformation.eDate']}">
    <af:outputText value="#{row.expirationDate}">
    <af:convertDateTime pattern="#{bindings.documentRevisions.hints.expirationDate.format}"/>
    </af:outputText>
    </af:column>
    <af:column sortProperty="status" sortable="true"
    headerText="#{res['contentInformation.status']}">
    <af:outputText value="#{row.status}"/>
    </af:column>
    <af:column sortProperty="did" sortable="true"
    headerText="#{ res['contentInformation.did']}">
    <af:outputText value="#{row.did}">
    <af:convertNumber groupingUsed="false"
    pattern="#{bindings.documentRevisions.hints.did.format}"/>
    </af:outputText>
    </af:column>
    <af:column sortProperty="docName" sortable="true"
    headerText="#{res['contentInformation.docName']}">
    <af:goLink destination="#{row.docURL}" text="#{row.docName}"
    targetFrame="_blank"/>
    </af:column>
    <af:column sortProperty="docURL" sortable="true"
    headerText="#{bindings.documentRevisions.hints.docURL.label}">
    <af:outputText value="#{row.docURL}"/>
    </af:column>
    </af:table>
    <af:panelFormLayout>
    </af:panelFormLayout>
    </af:panelWindow>
    </af:popup>
    public String refresh_ContentRevisionInfo1() {
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("getContentRevisionInfo");
    Object result = operationBinding.execute();
    bindings.refresh();
    DCBindingContainer dcBindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding iterBind= (DCIteratorBinding)dcBindings.get("documentRevisionsIterator");
    iterBind.executeQuery();
    iterBind.refresh(DCIteratorBinding.RANGESIZE_UNLIMITED);
    return null;
    public void getRevisionLauncherListener(LaunchEvent launchEvent) {
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("getContentRevisionInfo");
    Object result = operationBinding.execute();
    bindings.refresh();
    DCBindingContainer dcBindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding iterBind= (DCIteratorBinding)dcBindings.get("documentRevisionsIterator");
    iterBind.executeQuery();
    iterBind.refresh(DCIteratorBinding.RANGESIZE_UNLIMITED);
    Thanks for all Help.
    Jaydeep

    You are in the wrong forum. This is the the forum for the [Application Express development tool|http://apex.oracle.com]. You want a JDeveloper/ADF forum.

  • Problems with dropped frames in FCP 4.5 Log & Capture

    Thanks for the advice on my previous post regarding sound problems - those are now sorted, but I am having problems with dropped frames in Log and Capture. I am using FCP 4.5 with OS X 10.4.10 on a Powermac G4. CPU 867 mhz dual processor. L2 Cache 256 kb, L3 cache 1 mb. Memory 1g. Bus speed 133hz. I am capturing from a Canon XM1 via Firewire. The scratch disk is a 500gb Seagate FreeAgent USB 2.0, 7200rpm.
    Basically, the video and audio are fine while playing back in Log and Capture and I can control the device, but any attempt to capture, whether Capture Now or Clip result in a very jerky picture and aborts with dropped frames after a few seconds. The sound is ok for the few seconds before it aborts. There do not appear to be any problems with the timecode.
    My capture preset is DV Pal 48hz.
    Any advice or pointers gratefully received.
    Thanks, Ally

    Well quite. I have just tried it in the internal hard drive and it works fine now. I am going to have to capture everything to my small hard drive and move it across to the external. Then, when I have finished I am going to bang my head against the wall and buy an external HDD with Firewire.
    Thanks,
    Ally

  • [Solved] Problem in refreshing the iterators

    Hi All -
    I am facing problem in refreshing the iterators on the page / retaining the values in the view when refreshing the region (a task flow dropped as region).
    I have two ShowDetailItems in tabbed regions as Tab1 and Tab2. Tab1 has a task flow, having page with Transient VOs, as region and same
    is the case with Tab2. As per my requirement I have to navigate between Tabs and have to refresh the regions in the Tabs through bean as below.
    this.homeRegion.refresh(FacesContext.getCurrentInstance());
    But in doing so i.e. navigating from Tab1 to Tab2 and coming back to Tab1, I lose the data in the Tab1.
    The problem is my bean associated with the page of the task flow in Tab1 does not get called when I refresh the
    region. And also the iterators lose their values when I come back to TAb1.
    I thought if I could reload the page or execute the iterators somehow when I refresh the region in the Tab, I would be able
    to fix the issue.
    Please help. I have been trying to figure it out for quite some time.
    Best -
    Rohit
    Edited by: Rohit Makkad on May 13, 2010 12:52 AM

    Hi All -
    I somehow overcame the issue. In my Tab2 region task flow I had set Transaction property as "Always Begin New Transaction" because of which when I go to the Tab2 the Tab1 was losing its values in the transient VO.
    For now, I reset the Transaction property of Tab2 to its default value and could navigate between different tabs with refreshing them everytime on disclosure event and still able to retain values in the transient VO.
    - Rohit

  • Problems with still frames blurring in Final Cut Express....

    I have had problems with still frames blurring. I've discovered it's related to the green line above the time line on the sequence bar. I can't find the name of the bar but it's red if you need rendering. There are green lines and when the scrubber hits the line the frame goes blurry.
    I'm guessing it's related to another previous attempt at adding motion to the still. My question, I think, is how to eliminate the green lines to the regular blue?
    jb

    If there are any colored bars above your video other than the normal grey/light blue then you need to render the sequence out by hitting Option-R.

  • Newbie problem - how to refresh frames when selected by a link

    A few weeks ago I was handed an antiquated frame-based site to update which has given me more than a few headaches.  I’ve managed to acquire a copy of Dreamweaver CS 3 from the power that be, and have been trying to find a solution to the following problem:
    I am attempting to tie in a .pdf document into a simple frame template, with a static left-hand frame allowing the user to select and display the anchored point on a .pdf document on the right.  This I’ve done with few peoblems, however when the user tries to click another link the dispayed .pdf doc after an initial selection the right-hand frame doesn’t move position to the newly selected anchor point.  
    This I think is due to the fact that the link refers to the same document, despite the fact that it’s to a different location on the doc.  I have been trying to find a way to ‘refresh’ the page when a link is selected so that the right-hand side diplay moves to the correct anchor point, but I’d had little luck.
    My question to you all is as follows: is there I can tell CS3 to refresh the right-hand side frame every time a link is clicked?  Any help would be appreciated!
    Yours, a very naiive newbie Dreamweaver user

    The website I'm currently working on is an internal network, so unfortunately it's unavailable for general view.  The layout sticks pretty close to the normal two frame dreamweaver template, with a series of created links on the left frame opening an adobe document in the right frame.  Very basic but that's largely the intention.
    The reason why I am linking to a .pdf document is simply because my work task demands I keep it in use, however since this means future revisions should be fairly easy (working off the same anchor/destination points in the .pdf document text this isnt a huge issue).
    Not entirely ideal I know but at least it creates an interesting problem!
    If anyone has a easy to create, newbie-friendly alternative to frames whereby I could create a site which links directly to specific areas in a .pdf document on demand I would be a very happy man!  Willing to potentially offer beer/first-born as payment.

  • Problem with refreshing JFrames and JDialogs

    My program is based on few JDialogs and one JFrame. I'm still changing them, one time one of the JDialogs is visible, other time JFrame. During this change I call dispose() for one window or frame and I create (if it wasn't created before) other component and call setVisible(true) for it. Problem is that sometimes (only sometimes! like 5% of calls) my windows appears but they are not refreshing (not showing new objects added to their lists or sth like that) until I resize my window by dragging mouse on the edge of it. Is there anyway to ensure that window will be displayed properly?

    I ran into this problem about a year ago...so I don't really remember but I think a call to validate(), or paint() or repaint() or something like that should do the trick (forgive me for not knowing the exact one but as I said it has been a while). Its been about that year since I stopped coding in java and moved to c#. You want the window to redraw its self what ever that is.

  • Refreshing frame error in indesign document

    Hi,
    I have this strange error that approx. every 10 seconds the frame refreshes.
    When I select a font for instance it refreshes before I can select one. Same with all other tools.
    I turned off the 'preflight document' but that doesn't resolve it.
    It only happens with one certain document.
    Luckily not with all documents so it must be some kind of setting or maybe even a font....
    I hope someone has some tips for where to look to get rid of this problem.
    T.i.a.
    Bert.

    I turned it off completely but it still isn't fixed.
    The strange thing is that it only happens with 1 document.
    So maybe a font is causing this, but never experienced a problem like this before.

  • Problem with Refresh

    Hi all,
    I have a main page which consists of 3 frames. 2 of these hold content of JSP's only, the problem is that when I press refresh I get an error 500, saying that there is an error in my main page i.e. "Can't happen - classname is null, who added this ?". I dont know how I can go about getting the main page to remember where it is at, should I create the contents of the main page with a JSP? Any advice would be mostly appreciated, as I need to get this working by tommorow if possible.

    Hi Osian,
    your error is not so much clear. Still iam trying. Are u seeing this error in IE5? Sometimes, in IE, you can get some 'cann't display-error' message comes wherefrom u can't get the root of the error. You can try that out in Netscape 4.74. It gives almost perfect error.
    I don't know whether I have caught that or not.
    atanu

Maybe you are looking for