Problems Refreshing with JPanels

I currently have a simple app that has four buttons along the bottom, and a JPanel on top (lets call this panel the parentPanel). The JPanel only has a border around it, and another JPanel inside it (lets call this inner one the childPanel). Depending on which of the four buttons are pressed, the the childPanel should change (i.e. its changed to a completely different panel, with different content).
However, the panels are not being repainted properly. If I simply change the panel (i.e. in the parentPanel, I call remove(childPanel), then childPanel = someOtherPanel, and finally add(childPanel), the screen wont show the changes until I resize the window. I've tried calling things such as invalidate and validate, revalidate, doLayout, repaint, and all of these do the same thing: it paints the new panel OVER the old one. i.e. the old content remains, and the new content is painted overtop so that you can see the old still where the new didnt overlap.
I tried also using setVisible to false, and back to true, and this works fine, but I'm also sure there should be a proper way of doing this (after looking at the setVisible code, I realized this works because swing draws a rectangle over the space when set to false, which would effectively erase the old content).
I also saw this thread which seems to be related, but nobody found a solution there either: http://forum.java.sun.com/thread.jspa?threadID=305694&messageID=1219759
any help would be appreciated

I think I've got the problem solved. Immediately after doing the add and remove, I called revalidate, and then repaint, and this seemed to fix it (as opposed to validate and repaint). Not really sure why this works, but oh well.
Also, cardlayout isnt an option (i'm trying to make an installer program that will be usable in swing and can also be used with charva, which is a library that allows swing-based apps to be rendered in ASCII for a command prompt, and that does not have the cardLayout available).
Message was edited by:
DeepanT
scratch that, validate OR revalidate works. I guess im just stupid:P

Similar Messages

  • Problem refreshing with partialtriggers

    Jdev 11.1.14
    I have a jspx page with a panel box->panel forms layout->some fields binded to VO
    Under this there's a paneltabbed with two showdetailitem and one region inside each paneltabbed.
    In the region there's a page fragment with a soc called soc2 (in both regions).
    I¡'m trying to refresh then upper panel box every time the soc is changed.
    In order to get this I have put in the partialtrigger property of the panel box the followin: "r3:soc2 r4:soc" where r3 and r4 are the id's of the regions and soc2 the id of the soc in the page fragment. I have also tried other combinations but I have never got the panelbox to refresh its data when the soc fileds changes its value.
    The soc fields is defined as autosubmit.
    Any idea ?

    Looking at the weblogic server logs I can find this:
    <DCExecutableBinding> <refreshIfNeeded> [6567] Invoke refresh for :SvNombresServicioViewPanelLateralAlumnosIterator
    <DCIteratorBinding> <refresh> [6568] Executing and syncing on IteratorBinding.refresh from :SvNombresServicioViewPanelLateralAlumnosIterator
    <DCUtil> <findSpelObject> [6569] DCUtil, returning:oracle.jbo.uicli.binding.JUApplication, for AppModuleDataControl
    <DCJboDataControl> <initializeApplicationModule> [6570] (oracle.adf.model.bc4j.DataControlFactoryImpl.SyncMode = Immediate
    <ApplicationPoolImpl> <reuseReferencedInstance> [6571] Reusing a cached session application module instance
    <ADFLogger> <begin> Attaching an iterator binding to a datasource
    <DCIteratorBinding> <getViewObject> [6572] Resolving VO:SvNombresServicioViewPanelLateralAlumnos for iterator binding:SvNombresServicioViewPanelLateralAlumnosIterator
    <ADFLogger> <addContextData> Attaching an iterator binding to a datasource
    <ADFLogger> <begin> Estimated row count
    <ADFLogger> <addContextData> Estimated row count
    This is the iterator of the panel box: SvNombresServicioViewPanelLateralAlumnosIterator
    It seems that doesn't execute the query to refresh the iterator.
    When the panel is corerctly updated I can see in the logs something like this:
    <DCExecutableBinding> <refreshIfNeeded> [7497] Invoke refresh for :SvNombresServicioViewPanelLateralAlumnosIterator
    <DCIteratorBinding> <refresh> [7498] Executing and syncing on IteratorBinding.refresh from :SvNombresServicioViewPanelLateralAlumnosIterator
    <ADFLogger> <begin> Attaching an iterator binding to a datasource
    <DCIteratorBinding> <getViewObject> [7499] Resolving VO:SvNombresServicioViewPanelLateralAlumnos for iterator binding:SvNombresServicioViewPanelLateralAlumnosIterator
    <DCIteratorBinding> <setRangeSizeForRSI> [7500] Changing iterator range size from :1 to :25
    <ADFLogger> <addContextData> Attaching an iterator binding to a datasource
    <ViewRowSetImpl> <doSetWhereClauseParam> [7501] SvNombresServicioViewPanelLateralAlumnos ViewRowSetImpl.doSetWhereClause(-1, SvAgrCodigo, 1)
    <ViewRowSetImpl> <doSetWhereClauseParam> [7502] SvNombresServicioViewPanelLateralAlumnos ViewRowSetImpl.doSetWhereClause(-1, Idioma, ESP)
    <ViewRowSetImpl> <doSetWhereClauseParam> [7503] SvNombresServicioViewPanelLateralAlumnos ViewRowSetImpl.doSetWhereClause(-1, SvTipSerCodigo, 1)
    <ViewRowSetImpl> <execute> [7504] SvNombresServicioViewPanelLateralAlumnos ViewRowSetImpl.execute caused params to be "un"changed
    <QueryCollection> <createColumnList> [7505] Column count: 11
    <ViewRowSetImpl> <setWhereClauseParamsInternal> [7506] SvNombresServicioViewPanelLateralAlumnos ViewRowSetImpl.setWhereClauseParams caused params changed
    <ViewRowSetImpl> <doSetWhereClauseParam> [7507] SvNombresServicioViewPanelLateralAlumnos ViewRowSetImpl.doSetWhereClause(-1, SvAgrCodigo, 1)
    <ViewRowSetImpl> <doSetWhereClauseParam> [7508] SvNombresServicioViewPanelLateralAlumnos ViewRowSetImpl.doSetWhereClause(-1, Idioma, ESP)
    <ViewRowSetImpl> <doSetWhereClauseParam> [7509] SvNombresServicioViewPanelLateralAlumnos ViewRowSetImpl.doSetWhereClause(-1, SvTipSerCodigo, 1)
    <ViewRowSetImpl> <execute> [7510] executeQueryForCollection ViewObject:SvNombresServicioViewPanelLateralAlumnos, RowSet:SvNombresServicioViewPanelLateralAlumnos
    <ADFLogger> <begin> Execute query
    <ViewObjectImpl> <closeStatementsResetRowSet> [7511] ViewObject: [edu.esade.model.VO.SvNombresServicioView]AppModule.SvNombresServicioViewPanelLateralAlumnos close prepared statements...
    <ViewObjectImpl> <getPreparedStatement> [7512] ViewObject: [edu.esade.model.VO.SvNombresServicioView]AppModule.SvNombresServicioViewPanelLateralAlumnos Created new QUERY statement
    <ViewObjectImpl> <buildQuery> [7513] SvNombresServicioViewPanelLateralAlumnos>#q computed SQLStmtBufLen: 576, actual=538, storing=568
    <ViewObjectImpl> <buildQuery> [7514] SELECT SvNombresServicio.SVTIPSER_CODIGO, SvNombresServicio.SVAGR_CODIGO, SvNombresServicio.NOMBRE, SvNombresServicio.AMBITO, SvNombresServicio.CONTENIDO, SvNombresServicio.RESTRICCIONES, SvNombresServicio.TEXTO_ADICIONAL, SvNombresServicio.IDICOD_CODIGO FROM SV_NOMBRES_SERVICIO SvNombresServicio WHERE ( ( (SvNombresServicio.SVTIPSER_CODIGO = :SvTipSerCodigo ) AND (SvNombresServicio.SVAGR_CODIGO = :SvAgrCodigo ) AND (UPPER(SvNombresServicio.IDICOD_CODIGO) = UPPER(:Idioma) ) ) )
    <ViewObjectImpl> <bindParametersForCollection> [7515] Bind params for ViewObject: [edu.esade.model.VO.SvNombresServicioView]AppModule.SvNombresServicioViewPanelLateralAlumnos
    <OracleSQLBuilderImpl> <bindParamValue> [7516] Binding param "SvAgrCodigo": 1
    <OracleSQLBuilderImpl> <bindParamValue> [7517] Binding param "Idioma": ESP
    <OracleSQLBuilderImpl> <bindParamValue> [7518] Binding param "SvTipSerCodigo": 1
    <ADFLogger> <addContextData> Execute query
    <ADFLogger> <addContextData> Execute query

  • Problem with Jpanel repaintingl

    Hi!
    I have a problem with Jpanel.
    First , I add a Jscrollpane to the panel and I don't
    see it.
    Second, I have a paint method in the Jpanel and I do there some painting but when I exe the application I can see the panel painting only when I put the mouse cursor
    on the place where the panel need to be.
    It is very strange.
    Help me.
    Yair.

    Example code??
    Can't tell what's wrong otherwise.
    First , I add a Jscrollpane to the panel and I don't
    see it.Have you added anything to this JScrollPane? Unless you set the scroll bar policies to always on you won't see anything if you haven't added anything to the scrollpane.
    Also, if you're only adding this scrollPane to your JPanel initilise it with
    JPanel whippet = new JPanel(new BorderLayout())
    .. then when you add your scrollPanel to your JPanel do this to make sure its added slap in the in middle of it:
    whippet.add(yourScrollPanel, BorderLayout.CENTER);
    Bit more info please - duuuuuuuuuuuuuuuude (man, "Finding Nemo" was well funny didn't you think.. anyways, that's besides the point.... could just be my 8 year old mental age though.. who knows.)?

  • Refresh a JPanel every time.

    Hi,
    How can you refresh a JPanel every time you invoke this JPanel?
    I have a Swing Application with a JSplitPane: a JTree on the left and a JPanel on the right. The JTree is used as a menu to display the right JPanel on the right. At this moment, the JPanels will only be created when I start the Application, so not on every time when I click on the JTree. Is it possible to get a new instance of the JPanel every time I reach it from the JTree (or at least get a trigger so that the latest information will be shown)?
    I hope someone can help. Thanks!
    Tongue78.
    |JTree                |  Place to show the JPanels  |
    |  ShowJPanel1  |                                           |
    |  ShowJPanel2  |                                           |
    |  ShowJPanel3  |                                           |
    |                        |                                           |
    |                        |                                           |
    --------------------------------------------------------------------

    A problem usually becomes easier when you disregard technical specs for a moment and think about it from a functional standpoint. In this case it would be something like "when I click on a node in the tree, I want to display a specific panel", right?
    For your right panel, check out the CardLayout. It allows you to put multiple panels in the same space, while only one is visible at a time.
    For the JTree, check out the event listeners that are part of Swing. A MouseListener for example will allow you to listen for mouse clicks on a certain component, so the start would be to install a mouselistener in the JTree.
    A google search for something like "java JTree node mouselistener" will probably get you further on this subject, for example to get sample code how to get the currently selected node.

  • Internet connection dropping out throughout day; problem NOT with provider

    My computer's connection to the Airport Express base station has no problems at all. But the internet connection goes out literally dozens of times a day (at no predictable schedule); this has been happening for almost a month. I originally thought the problem was with the internet provider, but I'm now beginning to think that either my settings are wrong, or that I have a corrupt file somewhere. Here are the details:
    I connect via a cable modem (Time Warner - Road Runner). I know people have had problems with Time Warner, so I assumed that was the issue; however I've had 3 service calls and they've checked signal strength inside and out, and swapped out the modem and the cables. I don't think it is simply problems in our geographic area (i.e. greater Los Angeles) due to the fact that the Internet fails sometimes 40-50 times daily, and the problem began when I upgraded from an old Airport base station to a brand new Airport Express about a month ago.
    The airport/internet connection is shared 3 ways: two MacBook Pro computers and one iPhone. My Airport's internet settings are as follows:
    Configure IPv4 using DHCP.
    DNS Servers: 66.75.160.63 and 66.75.160.64 (note I have already tried swapping these for OpenDNS -- this did NOT solve the problem)
    Domain name: socal.rr.com
    DHCP Client ID: [blank]
    Ethernet WAN port: Default-Automatic
    Connection Sharing: Share a Public IP address
    DHCP Beginning Address: 10.0.1.2
    Ending Address: 10.0.1.200
    DHCP Lease: 4 hours
    NAT settings are all unchecked
    One of the main reasons I believe that the problem is with my computer's settings or a corrupt file is that I can fix the problem whenever the Internet "goes down" almost 100% of the time by doing the following: after loading Airport Utility, I make ANY trivial change (i.e. changing the DHCP lease from 4 hours to 5 hours) and then click UPDATE to refresh the Airport base station. This fixes the problem almost 100% of the time. But then, anywhere from 10 minutes to 3 hours later, the Internet connection goes down again. [Unplugging the power from the modem, waiting 30 seconds, and plugging it back in ALSO fixes the problem almost 100% of the time, until it goes out again a little while later.]
    Also, I have tried disconnecting Airport and connecting directly to the cable modem via Ethernet. The problem remains exactly the same -- I can connect, but then the connection fails soon after. Unplugging then replugging the modem fixes the problem temporarily. So I do not think the problem is a defective Airport base station, nor do I think it is the modem (which has been replaced), nor Time Warner.
    I can't think of what else to try -- but any advice would be greatly appreciated -- it's impossible for us to work with the Internet constantly going out throughout the day, every day.
    Thank you!

    Just in case I'm missing something obvious, I am here pasting all CONSOLE messages that appear when I do a standard RESTART:
    8/22/08 7:15:12 AM loginwindow[24] DEAD_PROCESS: 0 console
    8/22/08 7:15:12 AM shutdown[128] reboot by mark:
    8/22/08 7:15:12 AM shutdown[128] SHUTDOWN_TIME: 1219414512 407699
    8/22/08 7:15:12 AM com.apple.loginwindow[24] Shutdown NOW!
    8/22/08 7:15:12 AM com.apple.loginwindow[24] System shutdown time has arrived
    8/22/08 7:15:12 AM mDNSResponder mDNSResponder-171.4 (Apr 20 2008 11:59:52)[23] stopping
    8/22/08 7:15:12 AM com.apple.SystemStarter[17] Stopping Adobe Version Cue CS2
    8/22/08 7:15:31 AM kernel npvhash=4095
    8/22/08 7:15:31 AM com.apple.launchctl.System[2] launchctl: Please convert the following to launchd: /etc/mach_init.d/chum.plist
    8/22/08 7:15:31 AM com.apple.launchctl.System[2] launchctl: Please convert the following to launchd: /etc/mach_init.d/dashboardadvisoryd.plist
    8/22/08 7:15:31 AM com.apple.launchctl.System[2] launchctl: Please convert the following to launchd: /etc/mach_init.d/pilotfish.plist
    8/22/08 7:15:31 AM com.apple.launchd[1] (com.adobe.versioncueCS3) Unknown key: ServiceDescription
    8/22/08 7:15:31 AM com.apple.launchd[1] (com.apple.distccdConfigd) Unknown key: SHAuthorizationRight
    8/22/08 7:15:31 AM com.apple.launchd[1] (org.cups.cupsd) Unknown key: SHAuthorizationRight
    8/22/08 7:15:31 AM com.apple.launchd[1] (org.ntp.ntpd) Unknown key: SHAuthorizationRight
    8/22/08 7:15:31 AM kextd[10] 413 cached, 0 uncached personalities to catalog
    8/22/08 7:15:31 AM kernel hi mem tramps at 0xffe00000
    8/22/08 7:15:31 AM kernel PAE enabled
    8/22/08 7:15:31 AM kernel 64 bit mode enabled
    8/22/08 7:15:31 AM kernel Darwin Kernel Version 9.4.0: Mon Jun 9 19:30:53 PDT 2008; root:xnu-1228.5.20~1/RELEASE_I386
    8/22/08 7:15:31 AM kernel standard timeslicing quantum is 10000 us
    8/22/08 7:15:31 AM kernel vmpagebootstrap: 972190 free pages and 76386 wired pages
    8/22/08 7:15:31 AM kernel migtable_maxdispl = 79
    8/22/08 7:15:31 AM kernel 98 prelinked modules
    8/22/08 7:15:31 AM kernel AppleACPICPU: ProcessorApicId=0 LocalApicId=0 Enabled
    8/22/08 7:15:31 AM kernel AppleACPICPU: ProcessorApicId=1 LocalApicId=1 Enabled
    8/22/08 7:15:31 AM kernel Loading security extension com.apple.security.TMSafetyNet
    8/22/08 7:15:31 AM kernel calling mpopolicyinit for TMSafetyNet
    8/22/08 7:15:31 AM kernel Security policy loaded: Safety net for Time Machine (TMSafetyNet)
    8/22/08 7:15:31 AM kernel Loading security extension com.apple.nke.applicationfirewall
    8/22/08 7:15:31 AM kernel Loading security extension com.apple.security.seatbelt
    8/22/08 7:15:31 AM kernel calling mpopolicyinit for mb
    8/22/08 7:15:31 AM kernel Seatbelt MACF policy initialized
    8/22/08 7:15:31 AM kernel Security policy loaded: Seatbelt Policy (mb)
    8/22/08 7:15:31 AM kernel Copyright (c) 1982, 1986, 1989, 1991, 1993
    8/22/08 7:15:31 AM kernel The Regents of the University of California. All rights reserved.
    8/22/08 7:15:31 AM kernel MAC Framework successfully initialized
    8/22/08 7:15:31 AM kernel using 16384 buffer headers and 4096 cluster IO buffer headers
    8/22/08 7:15:31 AM kernel devfsmakenode: not ready for devices!
    8/22/08 7:15:31 AM kernel IOAPIC: Version 0x20 Vectors 64:87
    8/22/08 7:15:31 AM kernel ACPI: System State [S0 S3 S4 S5] (S3)
    8/22/08 7:15:31 AM kernel mbinit: done
    8/22/08 7:15:31 AM kernel Security auditing service present
    8/22/08 7:15:31 AM kernel BSM auditing present
    8/22/08 7:15:31 AM kernel rooting via boot-uuid from /chosen: 419B2954-20DC-3880-AFEB-448924F9BE09
    8/22/08 7:15:31 AM kernel Waiting on <dict ID="0"><key>IOProviderClass</key><string ID="1">IOResources</string><key>IOResourceMatch</key><string ID="2">boot-uuid-media</string></dict>
    8/22/08 7:15:31 AM kernel FireWire (OHCI) TI ID 8025 built-in now active, GUID 001d4ffffe5f8d30; max speed s800.
    8/22/08 7:15:31 AM kernel Got boot device = IOService:/AppleACPIPlatformExpert/PCI0/AppleACPIPCI/SATA@1F,2/AppleICH8AHCI/PR T0@0/IOAHCIDevice@0/AppleAHCIDiskDriver/IOAHCIBlockStorageDevice/IOBlockStorageD river/ST9160823AS Media/IOGUIDPartitionScheme/Customer@2
    8/22/08 7:15:31 AM kernel BSD root: disk0s2, major 14, minor 2
    8/22/08 7:15:31 AM kernel Jettisoning kernel linker.
    8/22/08 7:15:31 AM kernel Resetting IOCatalogue.
    8/22/08 7:15:31 AM kernel GFX0: family specific matching fails
    8/22/08 7:15:31 AM kernel Matching service count = 1
    8/22/08 7:15:31 AM kernel Matching service count = 2
    8/22/08 7:15:31 AM kernel Matching service count = 2
    8/22/08 7:15:31 AM kernel Matching service count = 2
    8/22/08 7:15:31 AM kernel Matching service count = 2
    8/22/08 7:15:31 AM kernel Matching service count = 2
    8/22/08 7:15:31 AM kernel Previous Shutdown Cause: 5
    8/22/08 7:15:31 AM kernel NVDANV50HAL loaded and registered.
    8/22/08 7:15:31 AM kernel ath_attach: devid 0x24
    8/22/08 7:15:31 AM kernel GFX0: family specific matching fails
    8/22/08 7:15:32 AM kernel Override HT40 CTL Powers. EEPROM Version is 14.4, Device Type 5
    8/22/08 7:15:33 AM kernel mac 12.10 phy 8.1 radio 12.0
    8/22/08 7:15:33 AM kernel CSRHIDTransitionDriver::start []
    8/22/08 7:15:34 AM kernel CSRHIDTransitionDriver::switchToHCIMode legacy
    8/22/08 7:15:36 AM bootlog[38] BOOT_TIME: 1219414527 0
    8/22/08 7:15:36 AM rpc.statd[19] statd.notify - no notifications needed
    8/22/08 7:15:37 AM com.apple.launchd[1] (com.apple.distccdConfigd[32]) Exited with exit code: 255
    8/22/08 7:15:37 AM DirectoryService[34] Launched version 5.4 (v514.21)
    8/22/08 7:15:37 AM fseventsd[28] bumping event counter to: 0x2e4ba71 (current 0x0) from log file '0000000002e4b394'
    8/22/08 7:15:37 AM mDNSResponder mDNSResponder-171.4 (Apr 20 2008 11:59:52)[23] starting
    8/22/08 7:15:38 AM kernel yukon: Ethernet address 00:1b:63:a2:29:d1
    8/22/08 7:15:38 AM kernel AirPort_Athr5424ab: Ethernet address 00:1c:b3:c0:f5:49
    8/22/08 7:15:38 AM /System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow[24] Login Window Application Started
    8/22/08 7:15:38 AM com.apple.SecurityServer[20] Entering service
    8/22/08 7:15:38 AM /usr/sbin/ocspd[62] starting
    8/22/08 7:15:39 AM kernel 11D beacon causing regdomain change to CC 840
    8/22/08 7:15:39 AM kernel en1: 802.11d country code set to 'US'.
    8/22/08 7:15:40 AM kernel en1: Supported channels 1 2 3 4 5 6 7 8 9 10 11 36 40 44 48 52 56 60 64 149 153 157 161 165
    8/22/08 7:15:39 AM configd[36] setting hostname to "Macintosh-3.local"
    8/22/08 7:15:44 AM kernel USBF: 16.757 AppleUSBHubPort: Port 1 of Hub at 0x1a000000 about to terminate a busy device (IOUSBCompositeDevice) after waiting 10 seconds
    8/22/08 7:15:44 AM kernel USBF: 17. 59 CSRHIDTransitionDriver[0x723ca80](IOUSBCompositeDevice) GetFullConfigDescriptor(0) returned NULL
    8/22/08 7:15:44 AM kernel CSRHIDTransitionDriver... done
    8/22/08 7:15:46 AM kernel AppleYukon2: 00000000,00000000 sk98osx_dnet - recovering from missed interrupt
    8/22/08 7:15:46 AM org.ntp.ntpd[14] Error : nodename nor servname provided, or not known
    8/22/08 7:15:46 AM ntpdate[70] can't find host time.apple.com
    8/22/08 7:15:46 AM ntpdate[70] no servers can be used, exiting
    8/22/08 7:15:53 AM kernel AppleYukon2: 00000000,00000000 sk98osx_dnet - recovering from missed interrupt
    8/22/08 7:15:53 AM kernel AirPort: Link Up on en1
    8/22/08 7:15:54 AM kextd[10] writing kernel link data to /var/run/mach.sym
    8/22/08 7:16:02 AM loginwindow[24] Login Window Started Security Agent
    8/22/08 7:16:02 AM SecurityAgent[88] User info context values set
    8/22/08 7:16:02 AM SecurityAgent[88] Login Window done
    8/22/08 7:16:02 AM loginwindow[24] Login Window - Returned from Security Agent
    8/22/08 7:16:02 AM loginwindow[24] USER_PROCESS: 24 console
    8/22/08 7:16:02 AM com.apple.launchd[1] (com.apple.UserEventAgent-LoginWindow[81]) Exited: Terminated
    8/22/08 7:16:02 AM com.apple.launchctl.Aqua[91] launchctl: Please convert the following to launchd: /etc/machinit_peruser.d/com.adobe.versioncueCS3.monitor.plist
    8/22/08 7:16:02 AM com.apple.launchctl.Aqua[91] launchctl: Please convert the following to launchd: /etc/machinit_peruser.d/RemoteUI.plist
    8/22/08 7:16:03 AM com.apple.launchd[66] (0x101260.VersionCueCS3monitor) Failed to check-in!
    8/22/08 7:16:03 AM /System/Library/CoreServices/coreservicesd[44] SFLSharePointsEntry::CreateDSRecord: dsCreateRecordAndOpen(Mark's Public Folder) returned -14135

  • A bug with JPanel?

    I got a very ackward problem with JPanel. Please check the code below:
    import javax.swing.JPanel;
    public BasePanel extends JPanel{
        public BasePanel(){
           super();
    public class bb extends javax.swing.JDialog {
        public bb(java.awt.Frame parent, boolean modal) {
            super(parent, modal);
            initComponents();
        private void initComponents() {
            final BasePanel basePanel1 = new BasePanel();
            setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
            basePanel1.setBackground(java.awt.Color.white);
            basePanel1.setBorder(new javax.swing.border.EtchedBorder());
            getContentPane().add(basePanel1, java.awt.BorderLayout.CENTER);
            pack();
        public static void main(String args[]) {
            new bb(null, true).setVisible(true);
    }Even though I set the back colour of the panel WHITE, it does not turn into white when the dialog becomes visible. However, if I use JPanel instead of BasePanel while creating panel object, everything works fine. Is this a bug? I compiled and run the code above with both jvm version 1.4.02 and 1.5 beta 2, but the result is same.

    sure I did. I left it the class keyword out unintentionally. Furthermore, why shall I setVisible(true) of the BasePanel before packing it? It hasn't been done so in JPanel source code.

  • Jsf page not getting refreshed with updated values?

    Hi All,
    - managed-bean - session scope.
    - On a request, Even though, I am updating the bean's properties(values), my Jsf page is not getting refreshed with updated values as it is displaying the older values.
    Can anybody throw some light?
    Thanks in advance.
    - Sri

    Please try to give us more information, follow BalusC suggestion.
    For this moment I only can say you that the more common cause to this problem (in my expirence) is that you have problems with your conversion/validate phase.

  • Problem Refreshing Dynamic Region

    Hi ,
    I am facing problems in refreshing the dynamic region. Here is the usecase :
    One JSPX page : TestDynamicTaskflow.jspx
    First Taskflow : LinksTF -> Has one page with 3 command Buttons and one dynamic region.
    On click of 1st and second command button link tf-1 should be displayed and for third command button  tf2.
    Second Taskflow : tf-1    -> Taskflow has one jsff page with a inputText field ( required = true )
    Third taskflow : tf-2  -> Taskflow has one  jsff page with a inputText field ( required = true )
    Problem : Click 1st command button and tf1 is loaded. Now enter some value in inputText and click commandButton2 ... tf-1 is loaded but inputText retains the entered value... This is what is issue .

    Hi,
    the task flow is reloaded as you should be able to tell when setting a print message to be invoked in the task flow initializer. I assume the problem is with the text component not resetting its value. So its a JSF lifecycle problem, not a region issue. Have the command link switching the task flow, issuing
    oracle.adf.view.rich.util.ResetUtils.reset(regionId_in_here);
    Frank

  • How can i solve the problem relate with gmail links opening in firefox ? New link start in new tab and disconnects.Also youtube streaming breaks everytime .

    Firefox disconnects by clicking link in my gmail and most of time i refreshes the page few clicks. And also some problem relate with playing youtube videos. I frankly notice that i connect my net using PC Suite and also system protected with Anti virus program. So kindly check my browser and restore it's missing without using factory reset. Notify me for any urgent update of yours 16th version. Thanking for yours brilliant support .
    Jaison James.

    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
    Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!

  • Problem refreshing the classes

    I have problem refreshing the class with Tomcat 4.1 Server. I make changes in my class and they just don't reflect unless I restart the server. I don't want to refresh the server all the time. Is there any setting by which I can tell the server not to the version ffrom the memory. I even deleted that class from the classes directory but still the server would not know it.
    Thank you

    Oop's I am sorry. I did some terrible mistake. I am really sorry.
    Please Ignore this question

  • How to make SSRS 2008 charts auto refresh with IE9

    I have some charts on an SSRS report.  The report is set to auto refresh every 5 seconds.  The charts refresh fine, displaying any data updates in the database --- as long as I use IE8 or Chrome (Chrome only displays the top 3 inches of
    the report, though, so I can't use it).  However, the charts refuse to auto refresh with IE9.  Windows 7 doesn't have IE8.  I cannot find a solution.  How can I get IE9 to refresh the charts?  (Plain data will refresh, but charts will
    not.)

    Hi TLWKY,
    From your description, you set the report to refresh automatically and view it through Internet Explorer 9, however, the charts data of the report don't refresh properly although the plain text data of report refresh without problems.
    The issue may be caused by a javascript error with resizing image in IE9. At this time, I suggest that you redesign the structure of your report by placing the charts in rectangles. If the charts are placed in tablix, please insert rectangles into the tablix
    first.
    As a workround, you can also downgrade IE9 to IE8. To do this, we can uninstall the installed update "Windows Internet Explorer 9" from contorl panel and Windows 7 will revert to IE8 automatically after rebooting. For more information, please see:
    Downgrade IE9 to IE8 windows 7
    Hope this helps.
    Regards,
    Mike Yin
    TechNet Subscriber Support
    If you are
    TechNet Subscription user and have any feedback on our support quality, please send your feedback
    here.
    Mike Yin
    TechNet Community Support

  • Flex 4 Advanced DataGrid Refresh with database record changes at server end

    I've visited a number of posts regarding this problem and none of the solutions presented seem to fix the issue I'm having. I'm beginning to think it is a bug with the DataManagement functions in Flex.
    In my application I have followed the example presented on the Flex 4 tutorials:
    "Using data management to synchronize server updates".
    http://help.adobe.com/en_US/Flex/4.0/FlexTutorials/WSbde04e3d3e6474c4292a0331216558354b-80 00.html#WSbde04e3d3e6474c4-211e6e7c12846356a0c-8000
    I've tried with both client-side and server-side typing with the same issue.
    I'm using Flex 4 with ColdFusion 9 connecting to an MSSQL 2008 database. The table I'm working with uses a GUID as the identifyer (I have also tried with unique numeric types too).
    The application is running fine besides one issue. I am using the myService.commit(); control to do a bulk update to rows that have been added to the DataGrid. At the database end I am inserting values into some fields that are not determined at the client end. The database is updating fine, so the commit seems to be doing that part of the work. However, there does not seem to be any way of reflecting those new values provided at the ColdFusion CFC insert within the DataGrid. I've tried re-assigning the DataGrid to the dataProvider / different dataProvider after the commit. Refreshing the DataGrid using myDataGrid.dataProvider.refresh() seems to partly work. i.e. The Grid is refreshed with the records it held before I added any + the first row of the new inserts. The missing rows are only visible if I do not refresh at all (without their server side changes) or if I reload the entire page.
    Any help would be greatly appreciated.
    Cheers
    Pat
    PS. If I add further rows to the DataGrid and then commit a subsequent time then it refreshes with the rows that were missing on the previous commit and the first row of the latest commit.
    Message was edited by: Pat Moody

    My solution when adding new values at the server end is to modify the  createEmployee in the CFC to something like this. In this example I'm  using modified_date as the additional field maintained at the server  end. This could be any number of additional fields.
    Basically it's  doing an insert and then a select. Tried returning as array / Employee  but couldn't get that to work so using the query object return type of  "any". Using this method, no refresh is required on the DataGrid.
    <cffunction name="createEmployee" output="false" access="remote" returntype="any" > 
         <cfargument name="item" type="Employee" required="true" /> 
             <cfquery name="qCreateEmplyee" datasource="fb_tutorial_db" result="result"> 
                 INSERT INTO employees (first_name, last_name, gender, birth_date, hire_date, modified_date ) 
                 VALUES (<CFQUERYPARAM cfsqltype="CF_SQL_VARCHAR" VALUE="#item.fname#">, 
                         <CFQUERYPARAM cfsqltype="CF_SQL_VARCHAR" VALUE="#item.lname#">, 
                         <CFQUERYPARAM cfsqltype="CF_SQL_VARCHAR" VALUE="#item.gender#">, 
                         <CFQUERYPARAM cfsqltype="CF_SQL_DATE" VALUE="#item.bdate#">, 
                         <CFQUERYPARAM cfsqltype="CF_SQL_DATE" VALUE="#item.hdate#">,
                         <CFQUERYPARAM cfsqltype="CF_SQL_TIMESTAMP" VALUE="#now()#">) 
             </cfquery> 
             <cfset var qItem=""> 
             <cfquery name="qItem" datasource="fb_tutorial_db"> 
               SELECT 
               #result.GENERATED_KEY# as emp_id
               ,first_name as fname
               ,last_name as lname
               ,gender
               ,birth_date as bdate
               ,hire_date as hdate
               ,modified_date as mdate 
               FROM employees 
               WHERE emp_no = <CFQUERYPARAM CFSQLTYPE="CF_SQL_INTEGER" VALUE="#result.GENERATED_KEY#"> 
             </cfquery> 
          <cfreturn qItem>                         
    </cffunction>

  • Report doest get refreshed with updated data

    Hi All,
    I am facing a strange problem, where my report doest get refreshed with updated data when it’s called second time.
    1.     Screen1 – Preview option – Preview Screen
    2.     Preview Screen – Print option (Button) – Report generated and displayed in the IE Browser window with a dynamically generated PIN (Query written in WHEN-BUTTON-PRESSED trigger)
    3.     Screen2 is displayed in the backend
    4.     Screen2 – Cancel option – Screen1
    5.     Screen1 – Preview option – Preview Screen
    6.     Preview Screen – Print option (Button) – Report generated and displayed in the IE Browser window with a same PIN as in step2. Actually here the Query written in WHEN-BUTTON-PRESSED trigger generates a new PIN.
    7.     When checked in the backend this new PIN is updated, but the same is not displayed on the Report. That means to say that report is not refreshed. When I click on the refresh button in the IE Browser window explicitly, the report is refreshed and displays the PIN as found in the backend.
    What I expect is that the report should get refreshed automatically with a new PIN, when I choose Print option in Preview Screen.
    Can anybody help me in overcoming this challenge?
    Regards,
    SAM

    Hi All,
    What i did was i encoded the PIN and sent it as a paramter to call the report.
    In the report i decoded the PIN and printed it. This way my URL to call the report was always updated with the decoded PIN value and would refresh the page successfully, everytime its called.
    Regards,
    SAM

  • [SOLVED] Vi refreshing with 50% grey when cursor reaches scroll limit

    Hi everyone,
    I remember reading another thread where someone had a similar problem to this.  However, I can't find it so I'm posting my own.
    I'm getting an annoying problem in Vi when the cursor reaches the scrollable limit of the display window.  The screen is refreshed with a 50% grey background that completely covers the visible text within the terminal window.  When this happens, I drag or resize the terminal window within the desktop and the window refreshes and I can see the text. Also when I defocus/refocus the window I get the same result.  I would take a screenshot and post it here, but taking a screenshot defocuses the window, thus causing the problem to disappear.
    I'm using Gnome 3 & Gnome Terminal 3.2.1 (transparent bg - about 70%).
    Cheers,
    Harlequin.
    Last edited by C. M. Harlequin (2012-01-29 03:52:21)

    Thanks Vain,
    I haven't really looked into customising the way that Vi / Vim behaves - I probably I should.  I use it mainly for editing .config files and things, but I know people who practically use it in place of an IDE.
    I get the same results after adding to .exrc though.  The weird thing is that I can't take a screenshot of it or record the desktop - when I do it immediately refreshes the terminal screen.  Vim works fine, so I'm not going pull my hair out over this mystery if nobody else can reproduce it.
    Cheers.

  • Has Apple acknowledged the problem yet with itunes aborting preview of songs after about 10 seconds on windows 7 and if so is there an answer other than ipconfig?

    Has Apple acknowledged the problem yet with itunes aborting preview of songs after about 10 seconds on windows 7 and if so is there an answer other than ipconfig?  IPConfig /flushdns doesn't help at all.  Until they fix it I will be previewing and buying my songs thru Amazon.

    Doublechecking ... do you still get that if you update to iTunes 10.6.3.25 (just released today)?
    http://www.apple.com/itunes/download/

Maybe you are looking for

  • Calling forms from OAS10g on Linux

    We are deploying all forms and reports10g from Windows to Redhat Linux based OAS10g Server. Since directory structure / definition is changed in Linux environment and we use "/" in place of "\" <back slash), we have to change path of the call forms a

  • How do we solve the error ORA-32001?.

    How do I create a SPFILE and re-start the instance using the SPFILE to solve the error ORA-32001?. Thank you, Rhode

  • Updating library automatically ????

    Ok, complete noob here. I've copied all my CDs onto an external hard drive using Itune. But this has been done on different computers. My problem is that when I copy a CD to the e-HD from computer A, this CD is only added to the itune library on comp

  • You can't open Detour preferences because it doesn't work on an Intel-based

    i downloaded a program called 'Detour' it clearly should not have been installed on this computer. it is not in my applications folder, however it is a pane in my preference program. the error that comes up is this: "You can't open Detour preferences

  • Preserving transparency from Photoshop to Indesign?

    I have never encountered this problem before, but of course while working on a large multi-page document with a quick deadline I do. Both .pds files and .png files leave a faint box around them that shows where the "rest" of the image is when I print