Repaint() Issues with component

Hi.
I'm creating a Swing GUI using a JTree component. The particular setup I want is a JSplitPane
containing some functions in the top pane and the actual JTree displaying some data and possibly the resulting changes when any of these functions are used.
The problem I was having was in trying to update the JTree object after the user presses one of the
function JButtons on top. I have a call to repaint() as part of my event-handling code after the JButton's
procedure completes. However, since the JTree is generated using a separate method (i.e. im passing
in a TreeNode), the repaint() doesn't do anything.
The one thing that I've considered is extending the JTree class and overriding its repaint() method to
include that separate method call, but Is there any more elegant or standard way to do this that I'm not seeing?
Thanks in advance.

There is paintImmediately() method. You can also try to use
SwingUtilities.invokeAndWait call to let your tree be repainted.
regards,
Stas

Similar Messages

  • IPad 2 issue with Component to TV

    I have just purchased a Genuine Apple AV Component cable to connect to my TV.
    I connected it all up at the back of the TV, and connected it to my iPad 2 (5.0.1). Now I can get Audio, but no video.
    Connected it to the USB to give it charge..
    Looked under Settings General and there wasn't a TV OUT option, as I was expecting
    Also, within Video there wasnt any option to change PAL/NTSC. I'm based in the UK
    Any ideas?

    Same problem: we have 2 iPads: the one iPad 2 with version 4.3.5 is working fine, with the AV cable connector on it mirrors the iPad 2 perfectly. The TV out settings are displayed under Video.
    However with my other iPad 2, version 5.0.1, the latest, it's now impossible to use the mirroring feature, the same AV cable, connected to the same TV or monitor is not even detected by the iPad. The TV out settings are no longer in the Video settings (now replaced by the Home Sharing Id, you really wonder why...). I need the mirroring function back as I'm using my iPad for work to do presentations and the external monitors, TV or projectors won't detect it at all..and of course the expensive AV cable is now useless..
    I've tried looking for the TV out settings under the General Settings as recommended by other people on the forum but they don't appear even when the AV cable adapter is connected.
    I really hope it's a bug and that Apple is going to fix it ASAP!

  • Issue with Component Binding

    Hi,
    I'm using JDeveloper version - 11.1.1.6
    I have following usecase in my product:
    1. In summary page, I have table to display list of Activities.
    2. When user Clicks an Activity, display the Activity summary (Region) below the table. The Activity summary page has Panel Tabbed component with 2 ShowDetailItem components.
    I defined a binding in pageFlowScope for PanelTabbed component in the Managed Bean.
    When I select the first activity, In the Activity summary bean, the task-flow initializer method executes first and PanelTabbed component setter method gets executed later.
    But when I select any other activity the execution is in reverse order - The setter method of PanelTabbed component executes first and task-flow initializer method executes later.
    Is this expected behavior? How can I ensure that task-flow initializer method executes first every time before executing the component bindings setter method?
    Any inputs would be helpful.
    Thanks
    Ravi

    Hi,
    component bindings must be in request scope not pageFlowScope. Please use backingBeanScope in your case
    Frank

  • Layout issue with af:tree component

    I am using af:tree component but I am finding layout issue with it. I have a requirement where in I need the tree to stretch to the available space but a horizontal and a vertical scrollbar comes up automatically. Is there a way to handle this issue?

    User, without your jdev version it's hard to help.
    Have you embedded the tree component in a stretch layout?
    Timo

  • Issue with stock qty of component in Structured Articles in SAP BI

    Dear Experts,
    We are extracting stock in BI through SAP standard data source. We have used 2lis_03_bx and 2lis_03_bf data sources. We are facing issue with stock data validation due to structure articles (pre-pack) available in SAP source system.
    We have stock of structure articles available at DC in source system.  When we extract this information in BI, this article gets split into its components automatically. Due to which stock of components articles gets increased with huge amounts.
    To analysis it in further detail, we have created below scenario:
    Article Document Number:  4900000827
    Article Number (Pre-pack):  300000082901
    Article Number (Component): 300000082002
    Stock of pre- pack article at this article document number: 174 pc
    Stock of component article at this article document number: 348 pc (due to splitting of pre-pack article) + 151 (its own stock movement). Total stock for this article is 499. But actually total stock for this article should be 151 only.
    As per our Business requirement, pre-pack article should not be split into its components. And stock in BI should be totally in sync with SAP stock.
    I kindly request you to suggest the solution to rectify the same.
    Thanks in advance.
    --Vikas

    Hi Vikas,
    Check the OSS note L 1320386 - Frequently asked questions regarding BW Trade Foundation too.
    Regards,
    Rajesh

  • Issue with "firstRecord" Business Component method of JAVA Data bean API.

    Hi,
    Following is my use-case scenario:
    I have to add or associate child MVG business component (CUT_Address)
    with the parent business component (Account) using JAVA Data bean API.
    My requirement is: first to check whether child business component(i.e. CUT_address) exists. If it exists then associate it with parent business component (Account)
    otherwise create new CUT_address and associate it with account.
    Code (using JAVA Data bean APIs) Goes as follows:
    SiebelBusObject sBusObj = connBean.getBusObject("Account");
    parentBusComp = sBusObj.getBusComp("Account");
    SiebelBusComp parentBusComp;
    SiebelBusComp childBusComp;
    // retrieve required account.. Please assume Account1 exists
    parentBusComp.activateField("Name");
    parentBusComp.clearToQuery();
    parentBusComp.setSearchSpec("Name", "Account1");
    sBusComp.executeQuery2(true, true);
    sBusComp.firstRecord();
    Counter = 0;
    while (counter < Number_Of_Child_Records_To_Insert)
    childBusComp = parentBusComp.getMVGBusComp("City");
    associatedChildBusComp = childBusComp.getAssocBusComp();
    childBusComp.activateField("City");
    childBusComp.clearToQuery();
    childBusComp.setSearchSpec("City", Vector_of_city[counter]);
    sBusComp.executeQuery2(true, true);
    if( sBusComp.firstRecord() )
    // Child already exist and do processing accordingly
    else
    // Child does not exist and do processing accordingly
    childBusComp.release();
    childBusComp = null;
    associatedChildBusComp.release();
    associatedChildBusComp=null;
    Now the issue with this code is: For the first iteration, SbusComp.firstRecord returns 0 if records does not exist. However from the second iteration, SbusComp.firstRecord returns 1 even if there is no record matching the search specification.
    Any input towards the issue is highly appreciable.
    Thanks,
    Rohit.

    Setting the view mode to "AllView" helped.
    Thanks for the lead!
    In the end, I also had to invoke the business component method SetAdminMode with "true" as the argument so that I could also modify the records from my script.

  • Issue with custom receive Pipeline component

    I have been facing issue with creating a custom receive pipeline component. The Pipeline is to receive large file, if the file size is large it has to read the incoming stream to a folder and pass only some meta data through the MessageBox. The Execute method
    I am using is,
    #region IComponent Members
    public IBaseMessage Execute(IPipelineContext pContext, IBaseMessage pInMsg)
    if (_largeFileLocation == null || _largeFileLocation.Length == 0)
    _largeFileLocation = Path.GetTempPath();
    if (_thresholdSize == null || _thresholdSize == 0)
    _thresholdSize = 4096;
    if (pInMsg.BodyPart.GetOriginalDataStream().Length > _thresholdSize)
    Stream originalStream = pInMsg.BodyPart.GetOriginalDataStream();
    string largeFilePath = _largeFileLocation + "\\" + pInMsg.MessageID.ToString() + ".zip";
    FileStream fs = new FileStream(largeFilePath, FileMode.Create);
    // Write message to disk
    byte[] buffer = new byte[1];
    int bytesRead = originalStream.Read(buffer, 0, buffer.Length);
    while (bytesRead != 0)
    fs.Flush();
    fs.Write(buffer, 0, buffer.Length);
    bytesRead = originalStream.Read(buffer, 0, buffer.Length);
    fs.Flush();
    fs.Close();
    // Create a small xml file
    string xmlInfo = "<ns0:MsgInfo xmlns:ns0='http://SampleTestPL.SchemaLocation'><LargeFilePath>" + largeFilePath + "</LargeFilePath></ns0:MsgInfo>";
    byte[] byteArray = System.Text.Encoding.UTF8.GetBytes(xmlInfo);
    MemoryStream ms = new MemoryStream(byteArray);
    pInMsg.BodyPart.Data = ms;
    return pInMsg;
    #endregion
    Here I want the xml to be dropped in to the File share Eg: E:\Dropbox\PL\send and and the entire message to be dropped in the folder Eg: E:\Dropbox\sendLarge. so in the ReceivePipeline properties i set like
    And in the send port the destination i give is E:\Dropbox\PL\send.
    The issue is both the xml and the message are getting dropped in to the same folder E:\Dropbox\PL\send and the message is not getting dropped in E:\Dropbox\SendLarge. Any help is greatly appreciated.

    using System;
    using System.Collections.Generic;
    using System.Text;
    using Microsoft.BizTalk.Message.Interop;
    using Microsoft.BizTalk.Component.Interop;
    using System.IO;
    namespace Sample.ReceivePipelineLargeFile
    [ComponentCategory(CategoryTypes.CATID_PipelineComponent)]
    [ComponentCategory(CategoryTypes.CATID_Decoder)]
    [System.Runtime.InteropServices.Guid("53fd04d5-8337-42c2-99eb-32ac96d1105a")]
    public class ReceivePipelineLargeFile : IBaseComponent,
    IComponentUI,
    IComponent,
    IPersistPropertyBag
    #region IBaseComponent Members
    public string Description
    get
    return "Pipeline component used to receive large file and save it ina disk";
    public string Name
    get
    return "ReceivePipelineLargeFile";
    public string Version
    get
    { return "1.0.0.0";
    #endregion
    #region IComponentUI Members
    public IntPtr Icon
    get
    return new System.IntPtr();
    public System.Collections.IEnumerator Validate(object projectSystem)
    return null;
    #endregion
    #region IPersistPropertyBag Members
    private string _largeFileLocation;
    private int _thresholdSize;
    public string LargeFileLocation
    get { return _largeFileLocation; }
    set { _largeFileLocation = value; }
    public int ThresholdSize
    get { return _thresholdSize; }
    set { _thresholdSize = value; }
    public void GetClassID(out Guid classID)
    classID = new Guid("B261C9C2-4143-42A7-95E2-0B5C0D1F9228");
    public void InitNew()
    public void Load(IPropertyBag propertyBag, int errorLog)
    object val1 = null;
    object val2 = null;
    try
    propertyBag.Read("LargeFileLocation", out val1, 0);
    propertyBag.Read("ThresholdSize", out val2, 0);
    catch (ArgumentException)
    catch (Exception ex)
    throw new ApplicationException("Error reading PropertyBag: " + ex.Message);
    if (val1 != null)
    _largeFileLocation = (string)val1;
    if (val2 != null)
    _thresholdSize = (int)val2;
    public void Save(IPropertyBag propertyBag, bool clearDirty, bool saveAllProperties)
    object val1 = (object)_largeFileLocation;
    propertyBag.Write("LargeFileLocation", ref val1);
    object val2 = (object)_thresholdSize;
    propertyBag.Write("ThresholdSize", ref val2);
    #endregion
    #region IComponent Members
    public IBaseMessage Execute(IPipelineContext pContext, IBaseMessage pInMsg)
    if (_largeFileLocation == null || _largeFileLocation.Length == 0)
    _largeFileLocation = Path.GetTempPath();
    if (_thresholdSize == null || _thresholdSize == 0)
    _thresholdSize = 4096;
    if (pInMsg.BodyPart.GetOriginalDataStream().Length > _thresholdSize)
    Stream originalStream = pInMsg.BodyPart.GetOriginalDataStream();
    string largeFilePath = _largeFileLocation + "\\" + pInMsg.MessageID.ToString() + ".zip";
    FileStream fs = new FileStream(largeFilePath, FileMode.Create);
    // Write message to disk
    byte[] buffer = new byte[1];
    int bytesRead = originalStream.Read(buffer, 0, buffer.Length);
    while (bytesRead != 0)
    fs.Flush();
    fs.Write(buffer, 0, buffer.Length);
    bytesRead = originalStream.Read(buffer, 0, buffer.Length);
    fs.Flush();
    fs.Close();
    // Create a small xml file
    string xmlInfo = "<ns0:MsgInfo xmlns:ns0='http://SampleTestPL.SchemaLocation'><LargeFilePath>" + largeFilePath + "</LargeFilePath></ns0:MsgInfo>";
    byte[] byteArray = System.Text.Encoding.UTF8.GetBytes(xmlInfo);
    MemoryStream ms = new MemoryStream(byteArray);
    pInMsg.BodyPart.Data = ms;
    return pInMsg;
    #endregion
    Thanks Osman Hawari, for trying to help me out.

  • Issue with af:selectOneChoice component

    Hi All,
    I am facing issue when using the selectOneChoice components in the below scenario
    I have a page fragments, lets say it as MainPage.jsff, where records are shown in table. On selecting a record and pressing the update button the user moves to EditPage.jsff where the record is shown in editable mode. The MainPage.jsff and EditPage.jsff are based on the same View Object Instance. The EditPage.jsff contains 4 fields,
    field1 - Non Editable
    field2 - Non Editable
    field3 - Editable - selectOneChoice - dependent on field1 and field2. Achieved by setting the bind values in the View Accessors.
    field4 - Editable - selectOneChoice -dependent on field1, field2, field3. Achieved by setting the bind values in the View Accessors.
    Test Case: -
    User selects a record and clicks the edit button, all the fields - fields1, field2, field3, field4, fetch the correct values for the record. So far so good.
    Now, the user navigates back to MainPage.jsff and selects another record and clicks on the update button. This time the values of the field1 and field2 are proper but the values of field3 and field4 which are editable and displayed in selectOneChoice component display some other value with select item of the list containing only one item. Is there some caching issue with the selectOneChoice components which is creating the issue?
    When i do a browser refresh at this stage, the values in the fields - field3 and field4 are automatically set to correct value.
    Also, when i drop field3 and field4 from the view object as simple <af:outputText> the values are shown with correct values.
    Is there anything which i am missing?
    Thanks,
    Tarun
    P.S Though the page contain other components i have narrowed down the test case and considered only the components with the issue.

    Hi Tarun.
    I think selectOneChoices are not refresh try in your EditPage.jsff button ActionListner with fillowing way with partial trigger
    Craete binding attribute for two selectOneChoice and then
    YourBindUIComponent.resetValue();
    AdfFacesContext adfFacesCtx = AdfFacesContext.getCurrentInstance();
    adfFacesCtx.addPartialTarget(YourBindUIComponent);

  • Browser specific Issue with af:fileDownloadActionListener/ component.

    Hi all,
    We are facing an issue with <af:fileDownloadActionListener/> component.
    The issue is that when we download a particular file to the local system/machine, after downloading the file using <af:fileDownloadActionListener/>, none of the actions/links/button work on the page thereafter. We have to do a browser refresh or switch the URL.
    After doing some investigation, it is looking like a browser specific issue, as this is reproducible only on chrome but not on firefox or IE.
    The UI component used is <af:fileDownloadActionListener/> component. Below is the snippet of the code. Is there anything to be specified for af:fileDownloadActionListener?
    <f:facet name="buttonBar">
    <af:panelGroupLayout partialTriggers="expPoll expProgess" id="gsexppgl11">
    <af:commandButton text="#{uib_o_w_w_r_WebCenter.LABEL_DOWNLOAD}"
    shortDesc="#{uib_o_w_w_r_WebCenter.LABEL_DOWNLOAD}"
    id="expClientp"
    disabled="#{!pageFlowScope.o_w_w_i_v_b_l_WebCenterExportBean.showExportButtons}">
    <af:fileDownloadActionListener filename="#{pageFlowScope.o_w_w_i_v_b_l_WebCenterExportBean.fileName}"
    contentType="application/force-download; charset=utf-8"
    method="#{pageFlowScope.o_w_w_i_v_b_l_WebCenterExportBean.dumpOAROnClient}"/>
    </af:commandButton>
    </af:panelGroupLayout>
    </f:facet>
    Anyone has faced this issue before? Is this a known issue?
    Thanks,
    Ankush

    Jdveloper version is 11g. But we saw this issue with 12c as well.
    I have reproduced this in a standalone application as well. I had a page on which I just had a button attached to the file download component. And I faced the similar situation - works fine on IE/FF but causing issues on chrome/safari.

  • Issues with flvplayback component and domain names

    I have fms running on linux with an apache webserver on the same machine and I'm have some issues regarding domain-names.
    I have done the Walkthrough 2. Simple FLVPlayback 2.5 component which works nicely on my local machine using linux (and also on virtualized Windows). Locally it doesn't matter if I use my IP-adress or my domain-name, it all works fine. However, when I host the swf (on my local machine) and access it from another computer the video does not play. The player doesn't seem to load the flv. However looking at the fms-access-log it looks like a succesfull atempt, it connects, starts playing and transfers some data. I have a crossdomain-file in my apache root. I have tried using both domain names and IP-adresses accessing the swf and the flv. Also copying the swf to the other computer doesn't seem to help.
    Another issue that might be the same problem(?) is that when I try loading an flv with another player (also hosted on my local machine) I can get it to work from that other computer (and locally), but only when giving the IP-adress. When using the domain-name it will not work and there is no activity in the access-log.
    I have searched quite a bit without finding anything that solves this.
    Any help is appreciated.
    /Erik

    I should add that the two computers are on the same local network. In the swf I access the app: rtmp://computer1.domain/vod/ or give the IP and then state the streams as in the tutorial.
    Also, has anybody had any issues with hostnames vs IPs in rtmp-urls?
    Feeling a bit lost tbh.
    /Erik

  • NX6600 GT issues with DVI LCD and component HDTV dualview

    Hello -
    I am having some issues with my video card now that I am hooking my monitor up with a DVI cable. The VGA cable worked perfectly with the HDTV but I bought a KVM switch that is DVI only and have been told that DVI is much beter. So, the problem is that the card now identifies my LCD as monitor number 2 and my HDTV as number 1. I can change which is my primary monitor and it seems as though nothing happens. Since I use dualview th8is is a major problem because my start menu is still on the HDTV which is not on all the time. I don't know what the issue is because as soon as I hook it up with VGA there are no problems. It's annoying because I know how quirky KVM switches can be and this one is working perfectly except for this problem.
    Details:
    HDTV is hooked up with component out
    LCD is through DVI
    NX6600GT driver version 7.1.2.2
    Linkskey LDV-212ASK KVM switch
    Thanks for any help!

    I was hoping not to do this but I understand the simplicity of your suggestion.
    It just makes me regret spending the extra amount on the DVI KVM switch.

  • Issue with Parent child dashboards using SWFLoader component

    Hello Gurus,
    I am using Parent-child dashboards approach in our project.
    I have multiple child files embedded in Parent dashboard using the SWFLoader (directly passing the URL as SWFLoader value) to load child dashboards. All the child, parent swf's are saved in the same intranet folders.
    When I open the parent SWF, everything loads fine in the intranet.
    But for some users, when they open from the intranet, the child dashboard doesnt load up properly or size of the dashboard gets reduced to a small version. (Iam sure that it has nothing to do with the access/privileges)
    Any thoughts/ideas what could be causing an issue with child dashboard/resizing of the child dashboard.
    Please help!
    regards,
    S R

    Check whether the machine has compatible flash version in error specific machine and your machine.

  • Connection issues with MacBook Pro and DVI to component video

    How do I connect a 2007 macbook pro to a regular tv (non-hd) via the DVI port with component cables? The image is always scrambled. The connections are fine, what do I need to do?

    Concerning this comment:
    I know that neither the adapter nor the VGA cable have a problem since I connected the computer to my 1080p TV and it worked just fine...
    I would like to point out that 1080p has a lower pixel clock than will 1920 x 1200. So it could be the stability problem is only present when the pixel clock is at the high end of the range.
    You could return the adapter and try another. A new one might have better margins. Another thing you could try is to use a utility like SwitchResX to lower the pixel clock and see if stability improves.

  • Is there an issue with Swing on Windows 7?

    Hi,
    I'm running the latest version of Java on Windows 7. "java -version" returns the following:
    java version "1.6.0_21"
    Java(TM) SE Runtime Environment (build 1.6.0_21-b07)
    Java HotSpot(TM) Client VM (build 17.0-b17, mixed mode, sharing)
    However, when I try to run the JDialog example at "http://download-llnw.oracle.com/javase/1.5.0/docs/api/" (JDialog | How to Make Dialogs | The DialogDemo Example), it is not being painted correctly.
    I have a dual monitor setup. The display adapter is an NVIDIA GeForce FX5200. Is this a Windows 7 issue, or is something going wrong with my display adapter?
    Thanks very much.

    In short, components are not being painted fully or at all. If I mouse over the dialog (which I'm guessing forces a repaint), sometimes a given component will appear. In any case, it's not subtle. You would definitely notice it if it were occurring.
    Thanks for having a look though. I guess I will try re-installing the JRE or research possible issues with my video card.

  • 1.4.2 beta still has repaint issues

    Sorry guys. I know I have kvetched about this time
    and again in these forums. I know that some of you
    have found workarounds and solutions to your similar
    problems, and I am happy for you.
    I had hoped that 1.4.2 would be be better, but I just
    tested the beta version and there is no difference.
    Here is a description of the problem. It is a complex
    applet. Components within components within components.
    Initially the applet paints itself fine, but once occluded,
    it will not repaint. The only exception is the lowest
    level imbedded components, which are components inside
    a JEditorPane and do repaint. Everything else in applet will
    not repaint.
    The applet has worked fine in Java Runtime environments since
    1.1.8, and it still works fine as late as 1.3.1_06. Right now
    our customer, understandably, does not want to pay for a
    debugging effort for what is apparently a regression in the
    Java runtime. They are satisfied to stay with 1.3.1_06, though
    this does create client-side hassles and becomes less and less
    viable into the future.
    If anyone is experiencing similar problems, has a workaround,
    or a simpler test case that reproduces the problem, I would be
    grateful to know about it. Thanks.

    Ultimately, we had two problems which we needed to fix
    in order to qualify our application on 1.4.*.
    First, the repaint issue concerned some code that we had
    written to workaround issues in the ComponentView used
    inside the text pane. We had problems with the initial
    display of embedded components because at start-up time:
    the event queue had not started up, and the default
    component view had deferred some sizing computations via
    the "invokeLater" mechanism. We fixed this at the time
    by writing our own ComponentView class based on the Java
    source of the time. This approach was invalidated by changes
    to the graphics pipeline in 1.4.x. The solution was to
    write a new local version of ComponentView. We would prefer,
    of course, a more standard approach. The deferment of the
    component sizing is still an issue, and Sun has accepted this
    defect as a bug/enhancement-request (Bug Id 4851010).
    After fixing the repaint issue, we still had problems due to
    changes in the focus model on 1.4.x. We had been using a
    static JInternalFrame to float a tool palette for pumping
    special characters into our text pane. We discovered that
    this caused us to lose keyboard focus when the applet restarted.
    The solution to that was to make the tool palette non-static.
    Now we think we are ready to go with 1.4.x!
    Hope this gives you a clue you can use.

Maybe you are looking for

  • Extracting text in correct reading order

    Hi, I am using adobe SDK to extract text from PDF. It is workiing fine, but i am facing one major problem regarding this, i have a pdf with multiple columns when exctracting text from that pdf text is not being extracted in correct order. i found tha

  • HT1178 What does (error code -6584) mean?

    I have recently bought a new MacBook Pro and migrated all my data from my old MacBook Pro to the new one.  Now my new MacBook will not connect with the Time Capsule - I just get a message that: The operation can't be completed. An unexpected error oc

  • Smartform help on currency key fields

    hi i want to concatenate wa_ekpo-netpr with currency key ? in smartform i have pass it and display the data.  and i want to display the plant t001w details in my top of the form layout how and where i have to write the code how to declare fields? pls

  • ToString conversion to readable text

    Hi I am receiving responses from a webservice to let me know where the message sent to them failed. I receive the message in the following format: org.hhcc.research.bold.ws.client.ArrayOfString@a37427 this is generated from the following line of code

  • ICloud tabs not refreshing promptly

    iCloud tab synchronization is working for me, in general, but it's not staying up to date.  iCloud tabs on my iPad show my Mac as having web pages open that I closed ten minutes ago.  My mac shows the two open pages on my iPad, plus one that I closed