Symantec.itools jar

Dear Techies,
I have a OLD Java Code that makes use of,
import symantec.itools.util.Timer;
import symantec.itools.awt.ImagePanel;
Since, I am trying to compile it and I DONT have the respective JAR file for symantec I am getting the compilation error:
package symantec.itools.util does not exist
import symantec.itools.util.Timer;
Can anybody please help me as to where I can get this JAR which will compile my code successfully?
Thanks
- Vikas DK

Probably a very silly question, but my first place to look is always the source of the product--did you look at the symantec site for old versions of Java?

Similar Messages

  • "symantec.itools.awt.*" does not exist

    I imported the following packages to enable the setting of ImageURL and getting of URL.
    import symantec.itools.awt.shape.*;
    import symantec.itools.awt.*;
    I compiled the application under jdk1.4.1 but it complained that the above packages do not exist. It ran ok in Visual Cafe 4.1a. Just wonder if it is the problem of deprecation?
    Thanks in advance.

    Most likely it has to do with Classpath. symantec.itools.awt is either a jar or a directory structure with classes. The jar or the root of the directory structure must be in your Classpath.

  • Where to get symantec.itools.swing

    help!
    where can i get the package of com.symantec.itools.swing
    and symantec.itools.awt ?

    Hi ipooley,
    thanks for this reply but I know that page already.
    What I am searching for are icons of JComponents like JButton or JTextField etc. . You can see them for example in some GUI builders like JBuilder-Designer and they are looking as if they are Java native.
    Regards,
    Alex

  • Package symantec not found???

    Does anybody know where or how to find the classpath of the package?
    I included this to my classpath but it still doesn't work!
    "set path=%path%c:\...\symantec\itools\;
    import symantec.itools.awt.shape.*;
    import symantec.itools.awt.ImageButton;
    import symantec.itools.awt.VerticalSlider;
    import symantec.itools.awt.HorizontalSlider;
    import symantec.itools.awt.MultiList;
    import symantec.itools.awt.util.ProgressBar;
    The errors I encountered:
    package symantec.itools.awt.shape does not exist
    package symantec.itools.awt.ImageButton does not exist
    package symantec.itools.awt.VerticalSlider does not exist
    package symantec.itools.awt.HorizontalSlider does not exist
    package symantec.itools.awt.MultiList does not exist
    package symantec.itools.awt.util.ProgressBar does not existThanks!

    Wait! I fixed it on my laptop with Win98 and it works fine. However, it doesn't work on Windows 2000. Why?
    H:\R2\Client>javac client.java
    Error:
    c:\Opt\VisualCafeSE\Java\src\symantec\itools\awt\ImageButton.java:440: error while writing symantec.itools.awt.ImageButton.StyleVeto: c:\Opt\VisualCafeSE\Java\src\symantec\itools\awt\ImageButton$StyleVeto.class (The system cannot find the file specified)
    class StyleVeto implements java.beans.VetoableChangeListener, java.io.Serializable
    I did exactly the same thing with the proper setting of classpath for my laptop.

  • GUI packages in JDK

    Hi
    I don't have much problem importing the following packages from VisualCafe but they don't work with JDK because JDK doesn't come with these packages. My project has to be able to run in virtual machine. Does anybody know how to fix this problem?
    import com.sun.image.codec.jpeg.*;
    import symantec.itools.awt.shape.*;
    import symantec.itools.awt.ImageButton;
    I could have copy the folder "com" and "symantec" from VisualCafe to JDk but this project has to be able to run in JDK alone.
    Thanks

    I don't know which jdk you are using, but
    com.sun.image.codec.jpeg.*;
    is part of the rt.jar which comes whith the jdk 1.4.1.
    The jdk 1.4.x also supports different shapes
    java.awt.Rectangle
    java.awt.geom.Area
    So I think you can replace symantec.itools.awt.shape.*
    by java.awt.geom.*;
    The javax.swing.JButton supports image buttons.
    But it's also no problem to write your own ImageButton class.
    There is more or less nothing more to do than overwriting the paint
    method from java.awt.Button.

  • VM Crash with EXCEPTION_ACCESS_VIOLATION - after Inst. of MS Upd. KB 912945

    After installing Microsoft Update KB912945 on Windows XP SP2 EVERY CALL (!!!) of our java applet causes a crash of the installed JAVA VM 1.5.0_04 with the following EXCEPTION_ACCESS_VIOLATION.
    After DEinstallation of Microsoft Update KB912945 everything is again correct.
    Or: using an older version of JAVA VM (1.4.2 or 1.4.0) - also everything is ok - load the java applet functioned, even if the MS Update KB912945 is installed.
    I am grateful for each information!
    Here the details of the VM-Crash:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d0d1bea, pid=1880, tid=1180
    # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing)
    # Problematic frame:
    # C [awt.dll+0xd1bea]
    --------------- T H R E A D ---------------
    Current thread (0x05c37aa0): JavaThread "AWT-Windows" daemon [_thread_in_native, id=1180]
    siginfo: ExceptionCode=0xc0000005, writing address 0x000000fc
    Registers:
    EAX=0x00000000, EBX=0x00000000, ECX=0x00000001, EDX=0x7c91eb94
    ESP=0x060df9ac, EBP=0x060df9e8, ESI=0x05c37b5c, EDI=0x00008025
    EIP=0x6d0d1bea, EFLAGS=0x00000287
    Top of Stack: (sp=0x060df9ac)
    0x060df9ac: 6d0d1bb5 00500230 00000001 6d0e3de6
    0x060df9bc: 003f02a6 060dfa50 6d0e3860 00000000
    0x060df9cc: 05c37aa0 6d6c26d3 05c37b5c 060df9c0
    Instructions: (pc=0x6d0d1bea)
    0x6d0d1bda: c0 74 2e ff 74 24 04 e8 8a ea fe ff 59 6a 01 59
    0x6d0d1bea: 89 88 fc 00 00 00 33 c0 39 4c 24 08 6a 00 0f 94
    Stack: [0x05fe0000,0x060e0000), sp=0x060df9ac, free space=1022k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    C [awt.dll+0xd1bea]
    C [USER32.dll+0x8709]
    C [USER32.dll+0x87eb]
    C [USER32.dll+0xb368]
    C [USER32.dll+0xb3b4]
    C [ntdll.dll+0xeae3]
    C [USER32.dll+0x93df]
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j sun.awt.windows.WToolkit.eventLoop()V+0
    j sun.awt.windows.WToolkit.run()V+69
    j java.lang.Thread.run()V+11
    v ~StubRoutines::call_stub
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x02269378 JavaThread "AWT-EventQueue-4" [_thread_in_native, id=568]
    0x07a60760 JavaThread "Thread-13" [_thread_blocked, id=956]
    0x07aa20f8 JavaThread "thread applet-de.datev.bc.plugin.ShowJavaPluginVersion.class" [_thread_blocked, id=2768]
    0x05cc8db8 JavaThread "Keep-Alive-Timer" daemon [_thread_blocked, id=2236]
    0x05cca7e8 JavaThread "TimerQueue" daemon [_thread_blocked, id=812]
    0x05cafa50 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=2924]
    0x05caf068 JavaThread "ConsoleWriterThread" daemon [_thread_blocked, id=3284]
    0x05c37640 JavaThread "AWT-EventQueue-1" [_thread_in_native, id=2748]
    0x05c5a7e8 JavaThread "AWT-Shutdown" [_thread_blocked, id=204]
    0x05c3b0e8 JavaThread "traceMsgQueueThread" daemon [_thread_blocked, id=4024]
    =>0x05c37aa0 JavaThread "AWT-Windows" daemon [_thread_in_native, id=1180]
    0x05c36590 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=2064]
    0x0232af28 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=1476]
    0x02329b58 JavaThread "CompilerThread0" daemon [_thread_blocked, id=1560]
    0x02328e48 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=380]
    0x02272aa0 JavaThread "Finalizer" daemon [_thread_blocked, id=1780]
    0x02323a68 JavaThread "Reference Handler" daemon [_thread_blocked, id=1168]
    0x02256e70 JavaThread "main" [_thread_in_native, id=1948]
    Other Threads:
    0x02245b50 VMThread [id=3044]
    0x0232c138 WatcherThread [id=1164]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 576K, used 418K [0x20a80000, 0x20b20000, 0x211e0000)
    eden space 512K, 69% used [0x20a80000, 0x20ad89c8, 0x20b00000)
    from space 64K, 100% used [0x20b10000, 0x20b20000, 0x20b20000)
    to space 64K, 0% used [0x20b00000, 0x20b00000, 0x20b10000)
    tenured generation total 2336K, used 1612K [0x211e0000, 0x21428000, 0x26a80000)
    the space 2336K, 69% used [0x211e0000, 0x21373268, 0x21373400, 0x21428000)
    compacting perm gen total 8192K, used 1829K [0x26a80000, 0x27280000, 0x2aa80000)
    the space 8192K, 22% used [0x26a80000, 0x26c495c0, 0x26c49600, 0x27280000)
    ro space 8192K, 62% used [0x2aa80000, 0x2af893f0, 0x2af89400, 0x2b280000)
    rw space 12288K, 46% used [0x2b280000, 0x2b80fe20, 0x2b810000, 0x2be80000)
    Dynamic libraries:
    0x00400000 - 0x00419000      C:\Programme\Internet Explorer\iexplore.exe
    0x7c910000 - 0x7c9c7000      C:\WINDOWS\system32\ntdll.dll
    0x7c800000 - 0x7c906000      C:\WINDOWS\system32\kernel32.dll
    0x77be0000 - 0x77c38000      C:\WINDOWS\system32\msvcrt.dll
    0x77d10000 - 0x77da0000      C:\WINDOWS\system32\USER32.dll
    0x77ef0000 - 0x77f36000      C:\WINDOWS\system32\GDI32.dll
    0x77f40000 - 0x77fb6000      C:\WINDOWS\system32\SHLWAPI.dll
    0x77da0000 - 0x77e4a000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77e50000 - 0x77ee1000      C:\WINDOWS\system32\RPCRT4.dll
    0x77730000 - 0x7789e000      C:\WINDOWS\system32\SHDOCVW.dll
    0x77a50000 - 0x77ae5000      C:\WINDOWS\system32\CRYPT32.dll
    0x77af0000 - 0x77b02000      C:\WINDOWS\system32\MSASN1.dll
    0x76880000 - 0x76905000      C:\WINDOWS\system32\CRYPTUI.dll
    0x76bf0000 - 0x76c1e000      C:\WINDOWS\system32\WINTRUST.dll
    0x76c50000 - 0x76c78000      C:\WINDOWS\system32\IMAGEHLP.dll
    0x770f0000 - 0x7717c000      C:\WINDOWS\system32\OLEAUT32.dll
    0x774b0000 - 0x775ec000      C:\WINDOWS\system32\ole32.dll
    0x597d0000 - 0x59824000      C:\WINDOWS\system32\NETAPI32.dll
    0x77180000 - 0x77227000      C:\WINDOWS\system32\WININET.dll
    0x76f20000 - 0x76f4d000      C:\WINDOWS\system32\WLDAP32.dll
    0x77bd0000 - 0x77bd8000      C:\WINDOWS\system32\VERSION.dll
    0x773a0000 - 0x774a2000      C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll
    0x7c9d0000 - 0x7d1ee000      C:\WINDOWS\system32\SHELL32.dll
    0x5d450000 - 0x5d4e7000      C:\WINDOWS\system32\comctl32.dll
    0x5b0f0000 - 0x5b128000      C:\WINDOWS\system32\uxtheme.dll
    0x746a0000 - 0x746eb000      C:\WINDOWS\system32\MSCTF.dll
    0x75f20000 - 0x7601d000      C:\WINDOWS\system32\BROWSEUI.dll
    0x20000000 - 0x20013000      C:\WINDOWS\system32\browselc.dll
    0x77b10000 - 0x77b32000      C:\WINDOWS\system32\appHelp.dll
    0x76f90000 - 0x7700f000      C:\WINDOWS\system32\CLBCATQ.DLL
    0x77010000 - 0x770e3000      C:\WINDOWS\system32\COMRes.dll
    0x77fc0000 - 0x77fd1000      C:\WINDOWS\system32\Secur32.dll
    0x77230000 - 0x772d0000      C:\WINDOWS\system32\urlmon.dll
    0x779f0000 - 0x77a46000      C:\WINDOWS\System32\cscui.dll
    0x765a0000 - 0x765bd000      C:\WINDOWS\System32\CSCDLL.dll
    0x778f0000 - 0x779e4000      C:\WINDOWS\system32\SETUPAPI.dll
    0x10000000 - 0x1001b000      C:\DATEV\SYSTEM\DV02DF~1.DLL
    0x76020000 - 0x76085000      C:\WINDOWS\system32\MSVCP60.dll
    0x767a0000 - 0x767c7000      C:\WINDOWS\system32\SCHANNEL.DLL
    0x71a10000 - 0x71a27000      C:\WINDOWS\system32\WS2_32.dll
    0x71a00000 - 0x71a08000      C:\WINDOWS\system32\WS2HELP.dll
    0x76620000 - 0x766d5000      C:\WINDOWS\system32\USERENV.dll
    0x00eb0000 - 0x00f3e000      C:\WINDOWS\system32\shdoclc.dll
    0x00f40000 - 0x01219000      C:\WINDOWS\system32\xpsp2res.dll
    0x75dc0000 - 0x75e51000      C:\WINDOWS\system32\mlang.dll
    0x71a30000 - 0x71a3a000      C:\WINDOWS\system32\wsock32.dll
    0x719b0000 - 0x719f0000      C:\WINDOWS\system32\mswsock.dll
    0x66710000 - 0x66769000      C:\WINDOWS\system32\hnetcfg.dll
    0x719f0000 - 0x719f8000      C:\WINDOWS\System32\wshtcpip.dll
    0x76ea0000 - 0x76edc000      C:\WINDOWS\system32\RASAPI32.DLL
    0x76e50000 - 0x76e62000      C:\WINDOWS\system32\rasman.dll
    0x76e70000 - 0x76e9f000      C:\WINDOWS\system32\TAPI32.dll
    0x76e40000 - 0x76e4e000      C:\WINDOWS\system32\rtutils.dll
    0x76af0000 - 0x76b1e000      C:\WINDOWS\system32\WINMM.dll
    0x72240000 - 0x72245000      C:\WINDOWS\system32\sensapi.dll
    0x7d1f0000 - 0x7d4a2000      C:\WINDOWS\system32\msi.dll
    0x76970000 - 0x76a21000      C:\WINDOWS\system32\SXS.DLL
    0x01900000 - 0x0190c000      C:\Programme\VMware\VMware Tools\hook.dll
    0x76ee0000 - 0x76f07000      C:\WINDOWS\system32\DNSAPI.dll
    0x76f80000 - 0x76f86000      C:\WINDOWS\system32\rasadhlp.dll
    0x71f10000 - 0x71f14000      C:\WINDOWS\system32\security.dll
    0x77c40000 - 0x77c63000      C:\WINDOWS\system32\msv1_0.dll
    0x76d20000 - 0x76d39000      C:\WINDOWS\system32\iphlpapi.dll
    0x7d4b0000 - 0x7d79a000      C:\WINDOWS\System32\mshtml.dll
    0x74640000 - 0x74667000      C:\WINDOWS\System32\msls31.dll
    0x74670000 - 0x7469a000      C:\WINDOWS\System32\msimtf.dll
    0x76330000 - 0x7634d000      C:\WINDOWS\system32\IMM32.DLL
    0x75bf0000 - 0x75c5e000      C:\WINDOWS\System32\jscript.dll
    0x72c90000 - 0x72c99000      C:\WINDOWS\system32\wdmaud.drv
    0x72c80000 - 0x72c88000      C:\WINDOWS\system32\msacm32.drv
    0x77bb0000 - 0x77bc5000      C:\WINDOWS\system32\MSACM32.dll
    0x77ba0000 - 0x77ba7000      C:\WINDOWS\system32\midimap.dll
    0x75d40000 - 0x75db1000      C:\WINDOWS\System32\mshtmled.dll
    0x71cc0000 - 0x71cdc000      C:\WINDOWS\System32\actxprxy.dll
    0x73270000 - 0x732d7000      C:\WINDOWS\System32\vbscript.dll
    0x73d30000 - 0x73e2e000      C:\WINDOWS\System32\MFC42.DLL
    0x61dc0000 - 0x61dce000      C:\WINDOWS\system32\MFC42LOC.DLL
    0x672f0000 - 0x67330000      C:\WINDOWS\System32\iepeers.dll
    0x72f70000 - 0x72f96000      C:\WINDOWS\System32\WINSPOOL.DRV
    0x6d590000 - 0x6d5a1000      C:\Programme\Java\jre1.5.0_04\bin\npjpi150_04.dll
    0x5f1a0000 - 0x5f1b7000      C:\WINDOWS\system32\OLEPRO32.DLL
    0x6d400000 - 0x6d417000      C:\Programme\Java\jre1.5.0_04\bin\jpiexp32.dll
    0x76f70000 - 0x76f78000      C:\WINDOWS\System32\winrnr.dll
    0x6d450000 - 0x6d468000      C:\Programme\Java\jre1.5.0_04\bin\jpishare.dll
    0x6d640000 - 0x6d7c9000      C:\PROGRA~1\Java\JRE15~1.0_0\bin\client\jvm.dll
    0x6d280000 - 0x6d288000      C:\PROGRA~1\Java\JRE15~1.0_0\bin\hpi.dll
    0x76bb0000 - 0x76bbb000      C:\WINDOWS\system32\PSAPI.DLL
    0x6d610000 - 0x6d61c000      C:\PROGRA~1\Java\JRE15~1.0_0\bin\verify.dll
    0x6d300000 - 0x6d31d000      C:\PROGRA~1\Java\JRE15~1.0_0\bin\java.dll
    0x6d630000 - 0x6d63f000      C:\PROGRA~1\Java\JRE15~1.0_0\bin\zip.dll
    0x6d000000 - 0x6d167000      C:\Programme\Java\jre1.5.0_04\bin\awt.dll
    0x736d0000 - 0x73719000      C:\WINDOWS\system32\ddraw.dll
    0x73b30000 - 0x73b36000      C:\WINDOWS\system32\DCIMAN32.dll
    0x738b0000 - 0x73980000      C:\WINDOWS\system32\D3DIM700.DLL
    0x6d240000 - 0x6d27d000      C:\Programme\Java\jre1.5.0_04\bin\fontmanager.dll
    0x6d1f0000 - 0x6d203000      C:\Programme\Java\jre1.5.0_04\bin\deploy.dll
    0x6d5d0000 - 0x6d5ed000      C:\Programme\Java\jre1.5.0_04\bin\RegUtils.dll
    0x6d3e0000 - 0x6d3f4000      C:\Programme\Java\jre1.5.0_04\bin\jpicom32.dll
    0x6d4c0000 - 0x6d4d3000      C:\Programme\Java\jre1.5.0_04\bin\net.dll
    0x6d4e0000 - 0x6d4e9000      C:\Programme\Java\jre1.5.0_04\bin\nio.dll
    0x066f0000 - 0x066f6000      C:\WINDOWS\system32\xpsp3res.dll
    0x07890000 - 0x0789b000      C:\WINDOWS\System32\dispex.dll
    0x07fd0000 - 0x0815d000      C:\WINDOWS\system32\macromed\flash\flash.ocx
    0x76350000 - 0x7639a000      C:\WINDOWS\system32\comdlg32.dll
    0x74900000 - 0x74a30000      C:\WINDOWS\system32\MSXML3.dll
    0x4d5c0000 - 0x4d618000      C:\WINDOWS\system32\WINHTTP.dll
    0x4ded0000 - 0x4df0a000      C:\WINDOWS\system32\wmpdxm.dll
    0x71a80000 - 0x71a92000      C:\WINDOWS\system32\MPR.dll
    0x4b680000 - 0x4bb29000      C:\WINDOWS\system32\wmp.dll
    0x75ec0000 - 0x75ee1000      C:\WINDOWS\system32\MSVFW32.dll
    0x08700000 - 0x089d6000      C:\WINDOWS\system32\wmploc.dll
    0x69b10000 - 0x69c3f000      C:\WINDOWS\system32\msxml4.dll
    0x6d320000 - 0x6d345000      C:\Programme\Java\jre1.5.0_04\bin\JavaWebStart.dll
    0x5cd80000 - 0x5cd98000      C:\WINDOWS\System32\wshom.ocx
    0x73510000 - 0x73535000      C:\WINDOWS\System32\ScrRun.dll
    0x590c0000 - 0x590ce000      C:\WINDOWS\System32\wshDE.DLL
    VM Arguments:
    jvm_args: -Xbootclasspath/a:C:\PROGRA~1\Java\JRE15~1.0_0\lib\deploy.jar;C:\PROGRA~1\Java\JRE15~1.0_0\lib\plugin.jar -Xmx96m -Djavaplugin.maxHeapSize=96m -Xverify:remote -Djavaplugin.version=1.5.0_04 -Djavaplugin.nodotversion=150_04 -Dbrowser=sun.plugin -DtrustProxy=true -Dapplication.home=C:\PROGRA~1\Java\JRE15~1.0_0 -Djava.protocol.handler.pkgs=sun.plugin.net.protocol -Djavaplugin.vm.options=-Djava.class.path=C:\PROGRA~1\Java\JRE15~1.0_0\classes -Xbootclasspath/a:C:\PROGRA~1\Java\JRE15~1.0_0\lib\deploy.jar;C:\PROGRA~1\Java\JRE15~1.0_0\lib\plugin.jar -Xmx96m -Djavaplugin.maxHeapSize=96m -Xverify:remote -Djavaplugin.version=1.5.0_04 -Djavaplugin.nodotversion=150_04 -Dbrowser=sun.plugin -DtrustProxy=true -Dapplication.home=C:\PROGRA~1\Java\JRE15~1.0_0 -Djava.protocol.handler.pkgs=sun.plugin.net.protocol vfprintf
    java_command: <unknown>
    Environment Variables:
    PATH=C:\PROGRA~1\Java\JRE15~1.0_0\bin;C:\Programme\Internet Explorer;;C:\WINDOWS\SYSTEM32;C:\WINDOWS;C:\WINDOWS\SYSTEM32\WBEM;C:\DATEV\SYSTEM;.
    USERNAME=Administrator
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 8, GenuineIntel
    --------------- S Y S T E M ---------------
    OS: Windows XP Build 2600 Service Pack 2
    CPU:total 1 family 15, cmov, cx8, fxsr, mmx, sse, sse2, ht
    Memory: 4k page, physical 261620k(92228k free), swap 534940k(396532k free)
    vm_info: Java HotSpot(TM) Client VM (1.5.0_04-b05) for windows-x86, built on Jun 3 2005 02:10:41 by "java_re" with MS VC++ 6.0

    Hi,
    Can you tell me if this bug was fixed? what JVM?
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x7804172
    Function=Java_sun_java2d_loops_MaskFill_MaskFill+0xFA42
    Library=C:\Program Files\Java\j2re1.4.2_03\bin\awt.dll
    Current Java thread:
         at sun.java2d.loops.DrawGlyphList.DrawGlyphList(Native Method)
         at sun.java2d.pipe.SolidTextRenderer.drawGlyphList(Unknown Source)
         - locked <0x161a5c98> (a java.lang.Class)
         at sun.java2d.pipe.GlyphListPipe.drawString(Unknown Source)
         at sun.java2d.SunGraphics2D.drawString(Unknown Source)
         at symantec.itools.awt.BaseTabbedPanel.paint(BaseTabbedPanel.java)
         - locked <0x11479440> (a guigen.CustomTabPanel)
         at sun.awt.RepaintArea.paint(Unknown Source)
         at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.Dialog$1.run(Unknown Source)
         at java.awt.Dialog.show(Unknown Source)
         at prods.common.gui.settingspanels.AdvCommandsDlg.constructOtherOp(AdvCommandsDlg.java:129)
         at prods.mcu.gui.config.settingspanels.McuAdvCommandsDlg.<init>(McuAdvCommandsDlg.java:154)
         at prods.mcu.gui.config.settingspanels.McuSettingsAdvancedPanel.advancedCommandsClicked(McuSettingsAdvancedPanel.java:714)
         at prods.mcu.gui.config.settingspanels.McuSettingsAdvancedPanel.actionPerformed(McuSettingsAdvancedPanel.java:707)
         at java.awt.Button.processActionEvent(Unknown Source)
         at java.awt.Button.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Dynamic libraries:
    0x00400000 - 0x00419000      C:\Program Files\Internet Explorer\iexplore.exe
    0x7C900000 - 0x7C9B0000      C:\WINDOWS\system32\ntdll.dll
    0x7C800000 - 0x7C8F4000      C:\WINDOWS\system32\kernel32.dll
    0x77C10000 - 0x77C68000      C:\WINDOWS\system32\msvcrt.dll
    0x77D40000 - 0x77DD0000      C:\WINDOWS\system32\USER32.dll
    0x77F10000 - 0x77F57000      C:\WINDOWS\system32\GDI32.dll
    0x77F60000 - 0x77FD6000      C:\WINDOWS\system32\SHLWAPI.dll
    0x77DD0000 - 0x77E6B000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77E70000 - 0x77F01000      C:\WINDOWS\system32\RPCRT4.dll
    0x77760000 - 0x778CF000      C:\WINDOWS\system32\SHDOCVW.dll
    0x77A80000 - 0x77B14000      C:\WINDOWS\system32\CRYPT32.dll
    0x77B20000 - 0x77B32000      C:\WINDOWS\system32\MSASN1.dll
    0x754D0000 - 0x75550000      C:\WINDOWS\system32\CRYPTUI.dll
    0x76C30000 - 0x76C5E000      C:\WINDOWS\system32\WINTRUST.dll
    0x76C90000 - 0x76CB8000      C:\WINDOWS\system32\IMAGEHLP.dll
    0x77120000 - 0x771AC000      C:\WINDOWS\system32\OLEAUT32.dll
    0x774E0000 - 0x7761D000      C:\WINDOWS\system32\ole32.dll
    0x5B860000 - 0x5B8B4000      C:\WINDOWS\system32\NETAPI32.dll
    0x771B0000 - 0x77256000      C:\WINDOWS\system32\WININET.dll
    0x76F60000 - 0x76F8C000      C:\WINDOWS\system32\WLDAP32.dll
    0x77C00000 - 0x77C08000      C:\WINDOWS\system32\VERSION.dll
    0x629C0000 - 0x629C9000      C:\WINDOWS\system32\LPK.DLL
    0x74D90000 - 0x74DFB000      C:\WINDOWS\system32\USP10.dll
    0x773D0000 - 0x774D3000      C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03\comctl32.dll
    0x37000000 - 0x37013000      C:\WINDOWS\system32\EntApi.dll
    0x76BF0000 - 0x76BFB000      C:\WINDOWS\system32\PSAPI.DLL
    0x71AB0000 - 0x71AC7000      C:\WINDOWS\system32\WS2_32.dll
    0x71AA0000 - 0x71AA8000      C:\WINDOWS\system32\WS2HELP.dll
    0x7C9C0000 - 0x7D1D5000      C:\WINDOWS\system32\SHELL32.dll
    0x5D090000 - 0x5D12A000      C:\WINDOWS\system32\comctl32.dll
    0x74720000 - 0x7476B000      C:\WINDOWS\system32\MSCTF.dll
    0x75F80000 - 0x7607D000      C:\WINDOWS\system32\BROWSEUI.dll
    0x20000000 - 0x20012000      C:\WINDOWS\system32\browselc.dll
    0x77B40000 - 0x77B62000      C:\WINDOWS\system32\appHelp.dll
    0x76FD0000 - 0x7704F000      C:\WINDOWS\system32\CLBCATQ.DLL
    0x77050000 - 0x77115000      C:\WINDOWS\system32\COMRes.dll
    0x5AD70000 - 0x5ADA8000      C:\WINDOWS\system32\UxTheme.dll
    0x77FE0000 - 0x77FF1000      C:\WINDOWS\system32\Secur32.dll
    0x77A20000 - 0x77A74000      C:\WINDOWS\System32\cscui.dll
    0x76600000 - 0x7661D000      C:\WINDOWS\System32\CSCDLL.dll
    0x77920000 - 0x77A13000      C:\WINDOWS\system32\SETUPAPI.dll
    0x77260000 - 0x77300000      C:\WINDOWS\system32\urlmon.dll
    0x10000000 - 0x1000E000      C:\Program Files\Adobe\Acrobat 7.0\ActiveX\AcroIEHelper.dll
    0x7C340000 - 0x7C396000      C:\WINDOWS\system32\MSVCR71.dll
    0x01810000 - 0x01AD5000      C:\WINDOWS\system32\xpsp2res.dll
    0x71D40000 - 0x71D5C000      C:\WINDOWS\system32\actxprxy.dll
    0x75E90000 - 0x75F40000      C:\WINDOWS\system32\SXS.DLL
    0x7DC30000 - 0x7DF20000      C:\WINDOWS\system32\mshtml.dll
    0x746C0000 - 0x746E7000      C:\WINDOWS\system32\msls31.dll
    0x022E0000 - 0x02368000      C:\WINDOWS\system32\shdoclc.dll
    0x75CF0000 - 0x75D81000      C:\WINDOWS\system32\MLANG.dll
    0x71AD0000 - 0x71AD9000      C:\WINDOWS\system32\wsock32.dll
    0x746F0000 - 0x7471A000      C:\WINDOWS\system32\msimtf.dll
    0x76390000 - 0x763AD000      C:\WINDOWS\system32\IMM32.DLL
    0x325C0000 - 0x325D2000      C:\Program Files\Microsoft Office\OFFICE11\msohev.dll
    0x71A50000 - 0x71A8F000      C:\WINDOWS\system32\mswsock.dll
    0x662B0000 - 0x66308000      C:\WINDOWS\system32\hnetcfg.dll
    0x71A90000 - 0x71A98000      C:\WINDOWS\System32\wshtcpip.dll
    0x76EE0000 - 0x76F1C000      C:\WINDOWS\system32\RASAPI32.DLL
    0x76E90000 - 0x76EA2000      C:\WINDOWS\system32\rasman.dll
    0x76EB0000 - 0x76EDF000      C:\WINDOWS\system32\TAPI32.dll
    0x76E80000 - 0x76E8E000      C:\WINDOWS\system32\rtutils.dll
    0x76B40000 - 0x76B6D000      C:\WINDOWS\system32\WINMM.dll
    0x5DAC0000 - 0x5DAC8000      C:\WINDOWS\system32\rdpsnd.dll
    0x76360000 - 0x76370000      C:\WINDOWS\system32\WINSTA.dll
    0x77C70000 - 0x77C93000      C:\WINDOWS\system32\msv1_0.dll
    0x76D60000 - 0x76D79000      C:\WINDOWS\system32\iphlpapi.dll
    0x722B0000 - 0x722B5000      C:\WINDOWS\system32\sensapi.dll
    0x769C0000 - 0x76A73000      C:\WINDOWS\system32\USERENV.dll
    0x75C50000 - 0x75CBE000      C:\WINDOWS\system32\JScript.dll
    0x72D20000 - 0x72D29000      C:\WINDOWS\system32\wdmaud.drv
    0x72D10000 - 0x72D18000      C:\WINDOWS\system32\msacm32.drv
    0x77BE0000 - 0x77BF5000      C:\WINDOWS\system32\MSACM32.dll
    0x77BD0000 - 0x77BD7000      C:\WINDOWS\system32\midimap.dll
    0x76200000 - 0x76271000      C:\WINDOWS\system32\mshtmled.dll
    0x74980000 - 0x74A8E000      C:\WINDOWS\system32\msxml3.dll
    0x6D440000 - 0x6D450000      C:\Program Files\Java\j2re1.4.2_03\bin\npjpi142_03.dll
    0x5EDD0000 - 0x5EDE7000      C:\WINDOWS\system32\OLEPRO32.DLL
    0x6D310000 - 0x6D327000      C:\Program Files\Java\j2re1.4.2_03\bin\jpiexp32.dll
    0x76F20000 - 0x76F47000      C:\WINDOWS\system32\DNSAPI.dll
    0x76FB0000 - 0x76FB8000      C:\WINDOWS\System32\winrnr.dll
    0x6D380000 - 0x6D398000      C:\Program Files\Java\j2re1.4.2_03\bin\jpishare.dll
    0x08000000 - 0x08138000      C:\PROGRA~1\Java\J2RE14~1.2_0\bin\client\jvm.dll
    0x02ED0000 - 0x02ED7000      C:\PROGRA~1\Java\J2RE14~1.2_0\bin\hpi.dll
    0x02EF0000 - 0x02EFE000      C:\PROGRA~1\Java\J2RE14~1.2_0\bin\verify.dll
    0x02F00000 - 0x02F19000      C:\PROGRA~1\Java\J2RE14~1.2_0\bin\java.dll
    0x02F20000 - 0x02F2D000      C:\PROGRA~1\Java\J2RE14~1.2_0\bin\zip.dll
    0x077F0000 - 0x078FF000      C:\Program Files\Java\j2re1.4.2_03\bin\awt.dll
    0x73000000 - 0x73026000      C:\WINDOWS\system32\WINSPOOL.DRV
    0x07900000 - 0x07950000      C:\Program Files\Java\j2re1.4.2_03\bin\fontmanager.dll
    0x73760000 - 0x737A9000      C:\WINDOWS\system32\ddraw.dll
    0x73BC0000 - 0x73BC6000      C:\WINDOWS\system32\DCIMAN32.dll
    0x73940000 - 0x73A10000      C:\WINDOWS\system32\D3DIM700.DLL
    0x6D2F0000 - 0x6D304000      C:\Program Files\Java\j2re1.4.2_03\bin\jpicom32.dll
    0x041A0000 - 0x041AF000      C:\Program Files\Java\j2re1.4.2_03\bin\net.dll
    0x07F50000 - 0x07F72000      C:\Program Files\Java\j2re1.4.2_03\bin\dcpr.dll
    0x71B20000 - 0x71B32000      C:\WINDOWS\system32\MPR.dll
    0x02610000 - 0x0262E000      C:\Program Files\Java\j2re1.4.2_03\bin\jpeg.dll
    0x763B0000 - 0x763F9000      C:\WINDOWS\system32\comdlg32.dll
    0x76990000 - 0x769B5000      C:\WINDOWS\system32\ntshrui.dll
    0x76B20000 - 0x76B31000      C:\WINDOWS\system32\ATL.DLL
    0x75F60000 - 0x75F67000      C:\WINDOWS\System32\drprov.dll
    0x71C10000 - 0x71C1E000      C:\WINDOWS\System32\ntlanman.dll
    0x71CD0000 - 0x71CE7000      C:\WINDOWS\System32\NETUI0.dll
    0x71C90000 - 0x71CD0000      C:\WINDOWS\System32\NETUI1.dll
    0x71C80000 - 0x71C87000      C:\WINDOWS\System32\NETRAP.dll
    0x71BF0000 - 0x71C03000      C:\WINDOWS\System32\SAMLIB.dll
    0x75F70000 - 0x75F79000      C:\WINDOWS\System32\davclnt.dll
    0x76980000 - 0x76988000      C:\WINDOWS\system32\LINKINFO.dll
    0x01DF0000 - 0x01E0C000      C:\Program Files\Adobe\Acrobat 7.0\ActiveX\PDFShell.dll
    0x74E30000 - 0x74E9C000      C:\WINDOWS\system32\RICHED20.DLL
    0x59A60000 - 0x59B01000      C:\WINDOWS\system32\DBGHELP.dll
    Heap at VM Abort:
    Heap
    def new generation total 2432K, used 157K [0x10010000, 0x102b0000, 0x10770000)
    eden space 2176K, 7% used [0x10010000, 0x10037710, 0x10230000)
    from space 256K, 0% used [0x10230000, 0x10230000, 0x10270000)
    to space 256K, 0% used [0x10270000, 0x10270000, 0x102b0000)
    tenured generation total 31620K, used 19026K [0x10770000, 0x12651000, 0x16010000)
    the space 31620K, 60% used [0x10770000, 0x11a04a10, 0x11a04c00, 0x12651000)
    compacting perm gen total 9728K, used 9563K [0x16010000, 0x16990000, 0x1a010000)
    the space 9728K, 98% used [0x16010000, 0x16966f20, 0x16967000, 0x16990000)
    Local Time = Tue Nov 07 12:12:30 2006
    Elapsed Time = 79513
    # The exception above was detected in native code outside the VM
    # Java VM: Java HotSpot(TM) Client VM (1.4.2_03-b02 mixed mode)
    #

  • Swing layout/size problem with JFrame and JApplet.

    I have a class that extends a JFrame, the classes layout is BorderLayout. I then have a class that extend JApplet, this classes layout is GridBagLayout (this class has a JTabbedPane - which contains JPanels). The problem I'm having is no matter how big I make the size of the applet or frame (using setSize), the applet/frame stays the same size - no matter how large I make it.
    Can anyone please help?
    Thanks,
    dosteov

    Here is the basic code:
    Thanks in advance,
    dosteov
    public class EADAdm extends JApplet
    EADAdmFrame theFrame = new EADAdmFrame(this);
         public void init()
              // Take out this line if you don't use symantec.itools.net.RelativeURL or symantec.itools.awt.util.StatusScroller
    //          symantec.itools.lang.Context.setApplet(this);
              // This line prevents the "Swing: checked access to system event queue" message seen in some browsers.
              getRootPane().putClientProperty("defeatSystemEventQueueCheck", Boolean.TRUE);
              // This code is automatically generated by Visual Cafe when you add
              // components to the visual environment. It instantiates and initializes
              // the components. To modify the code, only use code syntax that matches
              // what Visual Cafe can generate, or Visual Cafe may be unable to back
              // parse your Java file into its visual environment.
              //{{INIT_CONTROLS
              getContentPane().setLayout(new GridBagLayout());
              setEnabled(false);
              getContentPane().setBackground(java.awt.Color.lightGray);
              setSize(800,800);
              getContentPane().add(AdmTab, new com.symantec.itools.awt.GridBagConstraintsD(0,1,2,1,0.5,0.5,java.awt.GridBagConstraints.CENTER,java.awt.GridBagConstraints.HORIZONTAL,new Insets(3,12,4,14),120,120));
              AdmTab.setFont(new Font("Dialog", Font.PLAIN, 12));
              titleLbl.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
              titleLbl.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
              titleLbl.setText("EAD Administration");
              getContentPane().add(titleLbl, new com.symantec.itools.awt.GridBagConstraintsD(0,0,1,1,0.0,0.0,java.awt.GridBagConstraints.CENTER,java.awt.GridBagConstraints.NONE,new Insets(12,36,0,0),307,15));
              titleLbl.setForeground(java.awt.Color.blue);
              titleLbl.setFont(new Font("Dialog", Font.BOLD, 15));
              exitBtn.setText("Exit EAD Administration");
              exitBtn.setActionCommand("Exit EAD Administration");
              getContentPane().add(exitBtn, new com.symantec.itools.awt.GridBagConstraintsD(0,2,2,1,0.0,0.0,java.awt.GridBagConstraints.CENTER,java.awt.GridBagConstraints.NONE,new Insets(6,371,10,14),66,8));
              exitBtn.setFont(new Font("Dialog", Font.PLAIN, 12));
         //theFrame.setVisible(false);
         login();
         AdmTab.addTab("Administration", new LogoPanel() );
         userPanel = createUserPanel();
         AdmTab.addTab("Edit Users", userPanel );
         fpoPanel = createFPOPanel();
         AdmTab.addTab("Edit FPO", fpoPanel );
         regulationPanel = createRegulationPanel();
         AdmTab.addTab("Edit Regulations", regulationPanel );
         rolloverPanel = createRolloverPanel();
         AdmTab.addTab("Rollover", rolloverPanel );           
              //{{REGISTER_LISTENERS
         SymMouse aSymMouse = new SymMouse();
              this.addMouseListener(aSymMouse);
              SymAction lSymAction = new SymAction();
              exitBtn.addActionListener(lSymAction);
              SymKey aSymKey = new SymKey();
              this.addKeyListener(aSymKey);
         theFrame.getContentPane().add(this);
    public class EADAdmFrame extends JFrame
    EADAdm theApplet;
    public EADAdmFrame(EADAdm theMainApplet)
              //{{INIT_CONTROLS
         //     theApplet = theMainApplet;
         //     this.getContentPane().add(theApplet);
              getContentPane().setLayout(new BorderLayout(0,0));
              getContentPane().setBackground(java.awt.Color.lightGray);
              setSize(1000,1000);
              setVisible(false);
         theApplet = theMainApplet;
              //{{REGISTER_LISTENERS
              SymWindow aSymWindow = new SymWindow();
              this.addWindowListener(aSymWindow);
              SymComponent aSymComponent = new SymComponent();
              this.addComponentListener(aSymComponent);

  • How to do implement the FrameAccess.java code in my project

    Iam doing an project in java for inserting the videos into oracle9i and searching the inserted videos using the frames of the videos inserted.I have done the project to insert and search the videos.But i have been asked to put an EXTRACT button to extract all the frames of the video being inserted.Please help me to implement the FrameAccess.java coding in my existing coding.I have pasted my coding(VideoInsert.java) and FrameAccess.java(used to extract frames) coding.
    The VideoInsert.java when executed will contain browse button to choose the video file(only .mpg files) to be inserted into the database.After selecting the file and when we press open button in the Open dialog box,the video will be played in jmf player in a separate window and the filepath of the video will be included in the textbox.Now what i need is,an extract button should be placed and when it is clicked,the frames of the corresponding selected video has to be extracted in the location where the project files are stored i.e.,the FrameAccess.java coding has to be executed.
    Please help me if anyone knows how to implement the above concept.
    VideoInsert.java
    import javax.swing.*;
    import java.util.*;
    import java.io.*;
    import oracle.sql.*;
    import java.sql.*;
    import oracle.jdbc.driver.*;
    import oracle.sql.BLOB ;
    import symantec.itools.multimedia.ImageViewer;
    public class VideoInsert extends javax.swing.JFrame {
        private Connection con;
        private Statement st=null;
        private OracleResultSet rs=null;
        int count=0;
        int count1=0;
        ImageViewer displaywindow = new ImageViewer();
        /** Creates new form VideoInsert */
        public VideoInsert() {
            initComponents();
            imgpane.add(displaywindow);
            try {
                DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
                con = DriverManager.getConnection("jdbc:oracle:oci:@","scott","tiger");
                  //con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:FIRST","scott","tiger");
                con.setAutoCommit(false);
                st =con.createStatement();
                rs=(OracleResultSet)st.executeQuery("select max(vid) from browsevideo");
                while (rs.next()) {
                    count = (rs.getInt(1) + 1);
                rs.close();
                st =con.createStatement();
                rs=(OracleResultSet)st.executeQuery("select max(imageno) from browseimage");
                while (rs.next()) {
                    count1 = (rs.getInt(1) + 1);
                rs.close();
            } catch (SQLException e) {
                e.printStackTrace();
            txtvid.setText(String.valueOf(count));
             VideoTypeComboBox.addItem("All");
            VideoTypeComboBox.addItem("Entertainment");
            VideoTypeComboBox.addItem("Sports");
            VideoTypeComboBox.addItem("Animation");
            VideoTypeComboBox.addItem("News");
             VideoTypeComboBox.addItem("Others");
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        private void initComponents() {//GEN-BEGIN:initComponents
            jLabel1 = new javax.swing.JLabel();
            txtvid = new javax.swing.JTextField();
            jLabel2 = new javax.swing.JLabel();
            txtvidfile = new javax.swing.JTextField();
            jLabel3 = new javax.swing.JLabel();
            txtvidinfo = new javax.swing.JTextField();
            jLabel4 = new javax.swing.JLabel();
            txtimgfile = new javax.swing.JTextField();
            vidbrowse = new javax.swing.JButton();
            imgbrowse = new javax.swing.JButton();
            jLabel5 = new javax.swing.JLabel();
            txtimgcont = new javax.swing.JTextField();
            insert = new javax.swing.JButton();
            imgpane = new javax.swing.JPanel();
            jLabel6 = new javax.swing.JLabel();
            VideoTypeComboBox = new javax.swing.JComboBox();
            getContentPane().setLayout(null);
            setTitle("VideoInsert");
            addWindowListener(new java.awt.event.WindowAdapter() {
                public void windowClosing(java.awt.event.WindowEvent evt) {
                    exitForm(evt);
            jLabel1.setText("Video ID");
            getContentPane().add(jLabel1);
            jLabel1.setBounds(30, 80, 90, 16);
            txtvid.setEditable(false);
            getContentPane().add(txtvid);
            txtvid.setBounds(130, 80, 130, 20);
            jLabel2.setText("VideoFile");
            getContentPane().add(jLabel2);
            jLabel2.setBounds(30, 130, 70, 16);
            getContentPane().add(txtvidfile);
            txtvidfile.setBounds(130, 130, 130, 20);
            jLabel3.setText("VideoInfo");
            getContentPane().add(jLabel3);
            jLabel3.setBounds(30, 180, 80, 16);
            getContentPane().add(txtvidinfo);
            txtvidinfo.setBounds(130, 180, 130, 20);
            jLabel4.setText("TopImage");
            getContentPane().add(jLabel4);
            jLabel4.setBounds(30, 230, 70, 16);
            getContentPane().add(txtimgfile);
            txtimgfile.setBounds(130, 230, 130, 20);
            vidbrowse.setText("Browse");
            vidbrowse.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    vidbrowseActionPerformed(evt);
            getContentPane().add(vidbrowse);
            vidbrowse.setBounds(280, 130, 78, 26);
            imgbrowse.setText("Browse");
            imgbrowse.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    imgbrowseActionPerformed(evt);
            getContentPane().add(imgbrowse);
            imgbrowse.setBounds(280, 230, 78, 26);
            jLabel5.setText("ImageContent");
            getContentPane().add(jLabel5);
            jLabel5.setBounds(30, 280, 80, 16);
            getContentPane().add(txtimgcont);
            txtimgcont.setBounds(130, 280, 130, 20);
            insert.setText("Insert");
            insert.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    insertActionPerformed(evt);
            getContentPane().add(insert);
            insert.setBounds(150, 400, 81, 26);
            imgpane.setLayout(new java.awt.BorderLayout());
            getContentPane().add(imgpane);
            imgpane.setBounds(410, 120, 350, 260);
            jLabel6.setText("Video Type");
            getContentPane().add(jLabel6);
            jLabel6.setBounds(30, 340, 80, 16);
            getContentPane().add(VideoTypeComboBox);
            VideoTypeComboBox.setBounds(130, 340, 130, 25);
            pack();
            java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
            setSize(new java.awt.Dimension(800, 600));
            setLocation((screenSize.width-800)/2,(screenSize.height-600)/2);
        }//GEN-END:initComponents
        private void insertActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_insertActionPerformed
            BLOB blb= null;
            PreparedStatement stmt = null;
            OutputStream fout=null;
            File f=null;
            FileInputStream fin=null;
            int bufferSize;
            byte[] buffer=null;
            int bytesRead = -1;
            String sfile1 = txtvidfile.getText();
            String sfile2 = txtimgfile.getText();
            String format=null;
            String format1=null;
            String videoinfo=txtvidinfo.getText();
            String imgcontent=txtimgcont.getText();
            String videoType=(String)VideoTypeComboBox.getSelectedItem();
            if(sfile1.endsWith("avi")) {
                format="avi";
            }else if(sfile1.endsWith("mpg")) {
                format="mpg";
            }else {
                format="mpg";
            if(sfile2.endsWith("jpg")) {
                format1="jpg";
            }else if(sfile2.endsWith("gif")) {
                format1="gif";
            }else {
                format1="jpg";
            if((sfile1.length()>0) && (sfile2.length()>0)) {
                try {
                    stmt=con.prepareStatement(" insert into browsevideo values (?,EMPTY_BLOB(),?,?,?)");
                    stmt.setInt(1,count);
                    stmt.setString(2,format);
                    stmt.setString(3,videoinfo);
                     stmt.setString(4,videoType);
                    stmt.executeUpdate();
                    stmt.close();
                    con.commit();
                }catch(Exception e) {
                    e.printStackTrace();
                try {
                    stmt = con.prepareStatement("Select video FROM browsevideo WHERE vid = ? for update of video");
                    stmt.setInt(1,count);
                    rs = (OracleResultSet)stmt.executeQuery();
                    rs.next();
                    blb = rs.getBLOB("video");
                    fout = blb.getBinaryOutputStream();
                    f = new File(sfile1);
                    fin = new FileInputStream(f);
                    bufferSize = blb.getBufferSize();
                    buffer = new byte[bufferSize];
                    while((bytesRead = fin.read(buffer)) != -1) {
                        fout.write(buffer, 0, bytesRead);
                    fout.flush();
                    fout.close();
                    con.commit();
                    rs.close();
                    stmt.close();
                }catch(Exception e) {
                    e.printStackTrace();
                try {
                    stmt=con.prepareStatement(" insert into browseimage values (?,?,?,EMPTY_BLOB(),?,?,?)");
                    stmt.setInt(1,count);
                    stmt.setInt(2,count1);
                    stmt.setInt(3,count1);
                    stmt.setString(4,imgcontent);
                    stmt.setString(5,format1);
                    stmt.setString(6,videoType);
                    stmt.executeUpdate();
                    stmt.close();
                    con.commit();
                }catch(Exception e) {
                    e.printStackTrace();
                try {
                    stmt = con.prepareStatement("Select image FROM browseimage WHERE imageno = ? for update of image");
                    stmt.setInt(1,count1);
                    rs = (OracleResultSet)stmt.executeQuery();
                    if(rs.next()) {
                        blb = rs.getBLOB("image");
                        fout = blb.getBinaryOutputStream();
                        f = new File(sfile2);
                        fin = new FileInputStream(f);
                        bufferSize = blb.getBufferSize();
                        buffer = new byte[bufferSize];
                        while((bytesRead = fin.read(buffer)) != -1) {
                            fout.write(buffer, 0, bytesRead);
                        fout.flush();
                        fout.close();
                        con.commit();
                        rs.close();
                    stmt.close();
                    count++;
                    count1++;
                    txtimgfile.setText("");
                    txtvidfile.setText("");
                    txtimgcont.setText("");
                    txtvidinfo.setText("");
                    txtvid.setText(String.valueOf(count));
                    JOptionPane.showMessageDialog(this,"Successfuly Completed");
                }catch(Exception e) {
                    e.printStackTrace();
        }//GEN-LAST:event_insertActionPerformed
        private void imgbrowseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_imgbrowseActionPerformed
            ExampleFileFilter filter1 = new ExampleFileFilter();
            JFileChooser chooser = new JFileChooser();
            filter1.addExtension("jpg");
            filter1.addExtension("gif");
            filter1.setDescription("JPG,GIF Images");
            chooser.setFileFilter(filter1);
            int returnVal = chooser.showOpenDialog(this);
            if(returnVal == JFileChooser.APPROVE_OPTION) {
                txtimgfile.setText(chooser.getSelectedFile().getAbsolutePath());
                try{
                        displaywindow.setImageURL(new java.net.URL("file:"+txtimgfile.getText()));
                        displaywindow.setStyle(ImageViewer.IMAGE_SCALED_TO_FIT);
                    }catch(Exception e){
                        e.printStackTrace();
        }//GEN-LAST:event_imgbrowseActionPerformed
        private void vidbrowseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_vidbrowseActionPerformed
           ExampleFileFilter filter2 = new ExampleFileFilter();
           JFileChooser chooser = new JFileChooser();
           filter2.addExtension("avi");
            filter2.addExtension("mpg");
            filter2.setDescription("AVI & MPG Video");
            chooser.setFileFilter(filter2);
            int returnVal = chooser.showOpenDialog(this);
            if(returnVal == JFileChooser.APPROVE_OPTION) {
                txtvidfile.setText(chooser.getSelectedFile().getAbsolutePath());
                VideoAudioPlayer vap=new VideoAudioPlayer(txtvidfile.getText());
        }//GEN-LAST:event_vidbrowseActionPerformed
        /** Exit the Application */
        private void exitForm(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_exitForm
            setVisible(false);
            dispose();
        }//GEN-LAST:event_exitForm
         * @param args the command line arguments
        /*public static void main(String args[]) {
            new VideoInsert().show();
        // Variables declaration - do not modify//GEN-BEGIN:variables
        private javax.swing.JButton imgbrowse;
        private javax.swing.JLabel jLabel4;
        private javax.swing.JTextField txtvid;
        private javax.swing.JLabel jLabel1;
        private javax.swing.JTextField txtimgcont;
        private javax.swing.JLabel jLabel3;
        private javax.swing.JLabel jLabel2;
        private javax.swing.JPanel imgpane;
        private javax.swing.JButton insert;
        private javax.swing.JComboBox VideoTypeComboBox;
        private javax.swing.JButton vidbrowse;
        private javax.swing.JTextField txtvidfile;
        private javax.swing.JLabel jLabel6;
        private javax.swing.JLabel jLabel5;
        private javax.swing.JTextField txtimgfile;
        private javax.swing.JTextField txtvidinfo;
        // End of variables declaration//GEN-END:variables
    FrameAccess.java
    import java.awt.*;
    import javax.media.*;
    import javax.media.control.TrackControl;
    import javax.media.Format;
    import javax.media.format.*;
    import java.io.*;
    import javax.imageio.*;
    import javax.imageio.stream.*;
    import java.awt.image.*;
    import java.util.*;
    import javax.media.util.*;
    * Sample program to access individual video frames by using a
    * "pass-thru" codec. The codec is inserted into the data flow
    * path. As data pass through this codec, a callback is invoked
    * for each frame of video data.
    public class FrameAccess implements ControllerListener {
         Processor p;
         Object waitSync = new Object();
         boolean stateTransitionOK = true;
         public boolean alreadyPrnt = false;
         * Given a media locator, create a processor and use that processor
         * as a player to playback the media.
         * During the processor's Configured state, two "pass-thru" codecs,
         * PreAccessCodec and PostAccessCodec, are set on the video track.
         * These codecs are used to get access to individual video frames
         * of the media.
         * Much of the code is just standard code to present media in JMF.
         public boolean open(MediaLocator ml) {
              try {
                   p = Manager.createProcessor(ml);
                                } catch (Exception e) {
                   System.err.println(
                        "Failed to create a processor from the given url: " + e);
                   return false;
              p.addControllerListener(this);
              // Put the Processor into configured state.
              p.configure();
              if (!waitForState(Processor.Configured)) {
                   System.err.println("Failed to configure the processor.");
                   return false;
              // So I can use it as a player.
              p.setContentDescriptor(null);
              // Obtain the track controls.
              TrackControl tc[] = p.getTrackControls();
              if (tc == null) {
                   System.err.println(
                        "Failed to obtain track controls from the processor.");
                   return false;
              // Search for the track control for the video track.
              TrackControl videoTrack = null;
              for (int i = 0; i < tc.length; i++) {
                   if (tc.getFormat() instanceof VideoFormat) videoTrack = tc[i];
                   else     tc[i].setEnabled(false);
              if (videoTrack == null) {
                   System.err.println("The input media does not contain a video track.");
                   return false;
              String videoFormat = videoTrack.getFormat().toString();
              Dimension videoSize = parseVideoSize(videoFormat);
              System.err.println("Video format: " + videoFormat);
              // Instantiate and set the frame access codec to the data flow path.
              try {
                   Codec codec[] = { new PostAccessCodec(videoSize)};
                   videoTrack.setCodecChain(codec);
              } catch (UnsupportedPlugInException e) {
                   System.err.println("The process does not support effects.");
              // Realize the processor.
              p.prefetch();
              if (!waitForState(Processor.Prefetched)) {
                   System.err.println("Failed to realise the processor.");
                   return false;
              p.start();
              return true;
         /**parse the size of the video from the string videoformat*/
         public Dimension parseVideoSize(String videoSize){
              int x=300, y=200;
              StringTokenizer strtok = new StringTokenizer(videoSize, ", ");
              strtok.nextToken();
              String size = strtok.nextToken();
              StringTokenizer sizeStrtok = new StringTokenizer(size, "x");
              try{
                   x = Integer.parseInt(sizeStrtok.nextToken());
                   y = Integer.parseInt(sizeStrtok.nextToken());
              } catch (NumberFormatException e){
                   System.out.println("unable to find video size, assuming default of 300x200");
              System.out.println("Image width = " + String.valueOf(x) +"\nImage height = "+ String.valueOf(y));
              return new Dimension(x, y);
         * Block until the processor has transitioned to the given state.
         * Return false if the transition failed.
         boolean waitForState(int state) {
              synchronized (waitSync) {
                   try {
                        while (p.getState() != state && stateTransitionOK)
                             waitSync.wait();
                   } catch (Exception e) {
              return stateTransitionOK;
         * Controller Listener.
         public void controllerUpdate(ControllerEvent evt) {
              if (evt instanceof ConfigureCompleteEvent
                   || evt instanceof RealizeCompleteEvent
                   || evt instanceof PrefetchCompleteEvent) {
                   synchronized (waitSync) {
                        stateTransitionOK = true;
                        waitSync.notifyAll();
              } else if (evt instanceof ResourceUnavailableEvent) {
                   synchronized (waitSync) {
                        stateTransitionOK = false;
                        waitSync.notifyAll();
              } else if (evt instanceof EndOfMediaEvent) {
                   p.close();
                   System.exit(0);
         * Main program
         public static void main(String[] args) {
    //          if (args.length == 0) {
    //               prUsage();
    //               System.exit(0);
    // System.out.print("masoud");
    String url = new String("file:F:\\AVSEQ01.mpg");
              if (url.indexOf(":") < 0) {
                   prUsage();
                   System.exit(0);
              MediaLocator ml;
              if ((ml = new MediaLocator(url)) == null) {
                   System.err.println("Cannot build media locator from: " + url);
                   System.exit(0);
              FrameAccess fa = new FrameAccess();
              if (!fa.open(ml))
                   System.exit(0);
         static void prUsage() {
              System.err.println("Usage: java FrameAccess <url>");
         * Inner class.
         * A pass-through codec to access to individual frames.
         public class PreAccessCodec implements Codec {
              * Callback to access individual video frames.
              void accessFrame(Buffer frame) {
                   // For demo, we'll just print out the frame #, time &
                   // data length.
                   long t = (long) (frame.getTimeStamp() / 10000000f);
                   System.err.println(
                        "Pre: frame #: "
                             + frame.getSequenceNumber()
                             + ", time: "
                             + ((float) t) / 100f
                             + ", len: "
                             + frame.getLength());
              * The code for a pass through codec.
              // We'll advertize as supporting all video formats.
              protected Format supportedIns[] = new Format[] { new VideoFormat(null)};
              // We'll advertize as supporting all video formats.
              protected Format supportedOuts[] = new Format[] { new VideoFormat(null)};
              Format input = null, output = null;
              public String getName() {
                   return "Pre-Access Codec";
              //these dont do anything
              public void open() {}
              public void close() {}
              public void reset() {}
              public Format[] getSupportedInputFormats() {
                   return supportedIns;
              public Format[] getSupportedOutputFormats(Format in) {
                   if (in == null)
                        return supportedOuts;
                   else {
                        // If an input format is given, we use that input format
                        // as the output since we are not modifying the bit stream
                        // at all.
                        Format outs[] = new Format[1];
                        outs[0] = in;
                        return outs;
              public Format setInputFormat(Format format) {
                   input = format;
                   return input;
              public Format setOutputFormat(Format format) {
                   output = format;
                   return output;
              public int process(Buffer in, Buffer out) {
                   // This is the "Callback" to access individual frames.
                   accessFrame(in);
                   // Swap the data between the input & output.
                   Object data = in.getData();
                   in.setData(out.getData());
                   out.setData(data);
                   // Copy the input attributes to the output
                   out.setFlags(Buffer.FLAG_NO_SYNC);
                   out.setFormat(in.getFormat());
                   out.setLength(in.getLength());
                   out.setOffset(in.getOffset());
                   return BUFFER_PROCESSED_OK;
              public Object[] getControls() {
                   return new Object[0];
              public Object getControl(String type) {
                   return null;
         public class PostAccessCodec extends PreAccessCodec {
              // We'll advertize as supporting all video formats.
              public PostAccessCodec(Dimension size) {
                   supportedIns = new Format[] { new RGBFormat()};
                   this.size = size;
              * Callback to access individual video frames.
              void accessFrame(Buffer frame) {
                   // For demo, we'll just print out the frame #, time &
                   // data length.
                   if (!alreadyPrnt) {
                        BufferToImage stopBuffer = new BufferToImage((VideoFormat) frame.getFormat());
                        Image stopImage = stopBuffer.createImage(frame);
                        try {
                             BufferedImage outImage = new BufferedImage(size.width, size.height, BufferedImage.TYPE_INT_RGB);
                             Graphics og = outImage.getGraphics();
                             og.drawImage(stopImage, 0, 0, size.width, size.height, null);
                             //prepareImage(outImage,rheight,rheight, null);
                             Iterator writers = ImageIO.getImageWritersByFormatName("jpg");
                             ImageWriter writer = (ImageWriter) writers.next();
                             //Once an ImageWriter has been obtained, its destination must be set to an ImageOutputStream:
                             File f = new File(frame.getSequenceNumber() + ".jpg");
                             ImageOutputStream ios = ImageIO.createImageOutputStream(f);
                             writer.setOutput(ios);
                             //Finally, the image may be written to the output stream:
                             //BufferedImage bi;
                             //writer.write(imagebi);
                             writer.write(outImage);
                             ios.close();
                        } catch (IOException e) {
                             System.out.println("Error :" + e);
                   //alreadyPrnt = true;
                   long t = (long) (frame.getTimeStamp() / 10000000f);
                   System.err.println(
                        "Post: frame #: "
                             + frame.getSequenceNumber()
                             + ", time: "
                             + ((float) t) / 100f
                             + ", len: "
                             + frame.getLength());
              public String getName() {
                   return "Post-Access Codec";
              private Dimension size;

    check out the java.lang.Runtime and java.lang.Process classes

  • JComboBox is not visible on JPanel

    I have a class that extends JPanel. Within this class I have added several different components; JLabels, JTextFields, JButtons and a JComboBox.
    All of the added components are visible and working except for the JComboBox. I can see the white background of the box and the popup and its list when I click on the area where the JComboBox is located, but I cannot see the selected text in the box. This seems strange since all the other components surrounding the JComboBox display correctly.
    The background is set to white and the foreground is set to black. It has three options in the popup which are displayed using the foreground color, as it should. When I select an option from the popup, it seems to be working because the next time I display the popup, that selection is highlighted. But the selected text never shows in the box.
    If I create a JComboBox in a JPanel, not an extended class, everything seems to work correctly. I can select from the popup and the selection appears in the box.
    Could you please give me some suggestions as to how to make the selected text in the JComboBox visible?
    Thanks
    Bob

    My layout manager is set to null. I don't think that there is anything obscuring it because the backgroud is visible. The only thing that I can't see it the selected text and the combo box down arrow. I am using VisualCafe to generate this code.
    The extended class is loaded from the following class:
    public class TheSchedule extends javax.swing.JFrame
    using the following code:
         void JButtonGenTimeUnits_actionPerformed(java.awt.event.ActionEvent event)
              JPanelMainPanel.add(new TimeUnitDefinition((Frame)this));
              JPanelMainPanel.repaint();
    The actual code of the TimeUnitDefinition is as follows:
    package com.klawuhn.schedule;
    import javax.swing.*;
    import java.beans.*;
    import java.awt.*;
    import com.symantec.itools.javax.swing.models.StringComboBoxModel;
    import symantec.itools.awt.util.Calendar;
    import com.symantec.itools.javax.swing.borders.LineBorder;
    public class TimeUnitDefinition extends javax.swing.JPanel {
    private Frame parentFrame = null;
         public TimeUnitDefinition(Frame parentFrame)
         this.parentFrame = parentFrame; // Needed when displaying the calendars
              //{{INIT_CONTROLS
              setAlignmentY(1.0F);
              setAlignmentX(1.0F);
              setOpaque(false);
              setLayout(null);
              setSize(457,283);
              JLabelStartDate.setText("Start Date:");
              add(JLabelStartDate);
              JLabelStartDate.setBounds(12,12,156,24);
              JTextFieldStartDate.setDisabledTextColor(java.awt.Color.white);
              JTextFieldStartDate.setToolTipText("This is the date to start generating time units.");
              JTextFieldStartDate.setEditable(false);
              add(JTextFieldStartDate);
              JTextFieldStartDate.setBackground(java.awt.Color.white);
              JTextFieldStartDate.setBounds(168,12,216,24);
              JButtonCalendar1.setText("-");
              JButtonCalendar1.setActionCommand("-");
              add(JButtonCalendar1);
              JButtonCalendar1.setBounds(384,12,24,24);
              JLabelEndDate.setText("End Date:");
              add(JLabelEndDate);
              JLabelEndDate.setBackground(java.awt.Color.cyan);
              JLabelEndDate.setBounds(12,48,156,24);
              JTextFieldEndDate.setDisabledTextColor(java.awt.Color.white);
              JTextFieldEndDate.setToolTipText("This is the date to start generating time units.");
              JTextFieldEndDate.setEditable(false);
              add(JTextFieldEndDate);
              JTextFieldEndDate.setBackground(java.awt.Color.white);
              JTextFieldEndDate.setBounds(168,48,216,24);
              JButtonCalendar2.setText("-");
              JButtonCalendar2.setActionCommand("-");
              add(JButtonCalendar2);
              JButtonCalendar2.setBounds(384,48,24,24);
              JLabelStartTime.setText("Start Time:");
              add(JLabelStartTime);
              JLabelStartTime.setBounds(12,84,156,24);
              JTextFieldStartTime.setToolTipText("This is the time of day to start generating time units.");
              add(JTextFieldStartTime);
              JTextFieldStartTime.setBounds(168,84,240,24);
              JLabelEndTime.setText("End Time:");
              add(JLabelEndTime);
              JLabelEndTime.setBounds(12,120,156,24);
              JTextFieldEndTime.setToolTipText("This is the time of day to end generating time units.");
              add(JTextFieldEndTime);
              JTextFieldEndTime.setBounds(168,120,240,24);
              JLabelUnitOfMeasure.setText("Unit of Measure:");
              add(JLabelUnitOfMeasure);
              JLabelUnitOfMeasure.setBounds(12,156,156,24);
              JComboBoxUnitOfMeasure.setModel(stringComboBoxModel1);
              JComboBoxUnitOfMeasure.setToolTipText("This is the unit of measure used when generating the time units.");
              add(JComboBoxUnitOfMeasure);
              JComboBoxUnitOfMeasure.setBackground(java.awt.Color.white);
              JComboBoxUnitOfMeasure.setForeground(java.awt.Color.black);
              JComboBoxUnitOfMeasure.setBounds(168,156,240,24);
              JLabelBlockSize.setText("Block Size:");
              add(JLabelBlockSize);
              JLabelBlockSize.setBounds(12,192,156,24);
              JTextFieldBlockSize.setText("45");
              JTextFieldBlockSize.setToolTipText("This is the size of the time unit in Unit of Measures.");
              add(JTextFieldBlockSize);
              JTextFieldBlockSize.setBounds(168,192,240,24);
              JButtonSubmit.setText("Submit");
              JButtonSubmit.setActionCommand("Submit");
              JButtonSubmit.setToolTipText("This button will generate the time units.");
              add(JButtonSubmit);
              JButtonSubmit.setBounds(36,228,108,40);
              JButtonCancel.setText("Cancel");
              JButtonCancel.setActionCommand("Cancel");
              JButtonCancel.setToolTipText("This button will discard any changes.");
              add(JButtonCancel);
              JButtonCancel.setBounds(288,228,108,40);
                   String[] tempString = new String[3];
                   tempString[0] = "Days";
                   tempString[1] = "Hours";
                   tempString[2] = "Minutes";
                   stringComboBoxModel1.setItems(tempString);
              //$$ stringComboBoxModel1.move(0,288);
              JComboBoxUnitOfMeasure.setSelectedIndex(2);
              //{{REGISTER_LISTENERS
              SymAction lSymAction = new SymAction();
              JButtonSubmit.addActionListener(lSymAction);
              JButtonCalendar1.addActionListener(lSymAction);
              JButtonCalendar2.addActionListener(lSymAction);
         //{{DECLARE_CONTROLS
         javax.swing.JLabel JLabelStartDate = new javax.swing.JLabel();
         javax.swing.JTextField JTextFieldStartDate = new javax.swing.JTextField();
         javax.swing.JButton JButtonCalendar1 = new javax.swing.JButton();
         javax.swing.JLabel JLabelEndDate = new javax.swing.JLabel();
         javax.swing.JTextField JTextFieldEndDate = new javax.swing.JTextField();
         javax.swing.JButton JButtonCalendar2 = new javax.swing.JButton();
         javax.swing.JLabel JLabelStartTime = new javax.swing.JLabel();
         javax.swing.JTextField JTextFieldStartTime = new javax.swing.JTextField();
         javax.swing.JLabel JLabelEndTime = new javax.swing.JLabel();
         javax.swing.JTextField JTextFieldEndTime = new javax.swing.JTextField();
         javax.swing.JLabel JLabelUnitOfMeasure = new javax.swing.JLabel();
         javax.swing.JComboBox JComboBoxUnitOfMeasure = new javax.swing.JComboBox();
         javax.swing.JLabel JLabelBlockSize = new javax.swing.JLabel();
         javax.swing.JTextField JTextFieldBlockSize = new javax.swing.JTextField();
         javax.swing.JButton JButtonSubmit = new javax.swing.JButton();
         javax.swing.JButton JButtonCancel = new javax.swing.JButton();
         com.symantec.itools.javax.swing.models.StringComboBoxModel stringComboBoxModel1 = new com.symantec.itools.javax.swing.models.StringComboBoxModel();
         class SymAction implements java.awt.event.ActionListener
              public void actionPerformed(java.awt.event.ActionEvent event)
                   Object object = event.getSource();
                   if (object == JButtonSubmit)
                        JButtonSubmit_actionPerformed(event);
                   else if (object == JButtonCalendar1)
                        JButtonCalendar1_actionPerformed(event);
                   else if (object == JButtonCalendar2)
                        JButtonCalendar2_actionPerformed(event);
         void JButtonSubmit_actionPerformed(java.awt.event.ActionEvent event)
              System.out.println("See Submit button");
              TimeUnitCreate timeUnitCreate = new TimeUnitCreate(
              JTextFieldStartDate.getText(),
              JTextFieldEndDate.getText(),
              JTextFieldStartTime.getText(),
              JTextFieldEndTime.getText(),
              (String)JComboBoxUnitOfMeasure.getSelectedItem(),
              JTextFieldBlockSize.getText()
              timeUnitCreate.createTimeUnits();
              this.setVisible(false);
    System.out.println("Done creating Time Units.");
    // (new TimeUnitDefinition()).setVisible(true);
         void JButtonCalendar1_actionPerformed(java.awt.event.ActionEvent event)
         CalendarDialog calendarDialog = new CalendarDialog(parentFrame,"Date",true);
         calendarDialog.show();
         JTextFieldStartDate.setText(calendarDialog.getSelectedDate());
         void JButtonCalendar2_actionPerformed(java.awt.event.ActionEvent event)
         CalendarDialog calendarDialog = new CalendarDialog(parentFrame,"Date",true);
         calendarDialog.show();
         JTextFieldEndDate.setText(calendarDialog.getSelectedDate());
    }

  • Jframe is flickering -- Urgent help please!

    Basically i want to resize the window when i click some button say, NEW or EDIT and making some components visible.
    I am using setSize() method to resize the Jframe/window and setVisible() method.
    Do i need to use other methods. If you need some other details let me know as soon as possible.
    Below is the code:
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import javax.swing.event.*;
    import java.awt.Insets;
    import java.awt.GridBagLayout;
    import java.net.*;
    import java.io.*;
    import java.util.*;
    import com.symantec.itools.javax.swing.borders.LineBorder;
    import com.symantec.itools.javax.swing.borders.EtchedBorder;
    import com.symantec.itools.javax.swing.borders.BevelBorder;
    import com.symantec.itools.javax.swing.borders.CompoundBorder;
    import com.symantec.itools.javax.swing.borders.EmptyBorder;
    public class psRulesEditQ extends JFrame implements WindowListener
    public boolean inDebugMode = false;
    DBClient mydb;
    String SchemaID;
    int flagQ;
    int flagA;     
    DefaultListModel QuestionsModel = new DefaultListModel();
    DefaultListModel AnswersModel = new DefaultListModel();
    YesNoDialog alert;
    public psRulesEditQ (String title, DBClient mydb, String SchemaID)
    super(title);
    this.mydb = mydb;
    this.SchemaID = SchemaID;
    init();
    getQuestions();
    setTitle("Edit Questions for Domain: " + UserAttributes.getCurrentDomainName());
         public void init()
              // Take out this line if you don't use symantec.itools.net.RelativeURL or symantec.itools.awt.util.StatusScroller
              //symantec.itools.lang.Context.setApplet(this);
              // This line prevents the "Swing: checked access to system event queue" message seen in some browsers.
              getRootPane().putClientProperty("defeatSystemEventQueueCheck", Boolean.TRUE);
              // This code is automatically generated by Visual Cafe when you add
              // components to the visual environment. It instantiates and initializes
              // the components. To modify the code, only use code syntax that matches
              // what Visual Cafe can generate, or Visual Cafe may be unable to back
              // parse your Java file into its visual environment.
              //{{INIT_CONTROLS
              getContentPane().setLayout(null);
              setSize(660,330);
              //setBounds(50,50,660,330);
              EditQuestionsPanel.setLayout(null);
              getContentPane().add(EditQuestionsPanel);
              EditQuestionsPanel.setBounds(0,0,660,520);
              QuestionsPane.setOpaque(true);
              EditQuestionsPanel.add(QuestionsPane);
              QuestionsPane.setBounds(12,48,396,144);
              QuestionsPane.getViewport().add(QuestionsList);
              QuestionsList.setBounds(0,0,393,141);
              AnswersPane.setOpaque(true);
              EditQuestionsPanel.add(AnswersPane);
              AnswersPane.setBounds(444,48,192,144);
              AnswersPane.getViewport().add(AnswersList);
              AnswersList.setBounds(0,0,189,141);
              EditQuestionsPane.setOpaque(true);
              EditQuestionsPanel.add(EditQuestionsPane);
              EditQuestionsPane.setBounds(12,324,360,120);
              EditQuestionsPane.setVisible(false);
              EditQuestionsPane.getViewport().add(EditQuestionsTextArea);
              EditQuestionsTextArea.setBounds(0,0,357,117);
              EditQuestionsPanel.add(EditAnswersTextField);
              EditAnswersTextField.setBounds(444,324,134,25);
              EditAnswersTextField.setVisible(false);
              DeleteQuestionButton.setText("Delete");
              DeleteQuestionButton.setActionCommand("Delete");
              EditQuestionsPanel.add(DeleteQuestionButton);
              DeleteQuestionButton.setBounds(12,204,70,24);
              EditQuestionButton.setText("Edit");
              EditQuestionButton.setActionCommand("Edit");
              EditQuestionsPanel.add(EditQuestionButton);
              EditQuestionButton.setBounds(96,204,70,24);
              NewQuestionButton.setText("New");
              NewQuestionButton.setActionCommand("New");
              EditQuestionsPanel.add(NewQuestionButton);
              NewQuestionButton.setBounds(180,204,70,24);
              DeleteAnswerButton.setText("Delete");
              DeleteAnswerButton.setActionCommand("Delete");
              EditQuestionsPanel.add(DeleteAnswerButton);
              DeleteAnswerButton.setBounds(444,204,70,24);
              EditAnswerButton.setText("Edit");
              EditAnswerButton.setActionCommand("Edit");
              EditQuestionsPanel.add(EditAnswerButton);
              EditAnswerButton.setBounds(515,204,60,24);
              NewAnswerButton.setText("New");
              NewAnswerButton.setActionCommand("New");
              EditQuestionsPanel.add(NewAnswerButton);
              NewAnswerButton.setBounds(576,204,60,24);
              OkButton.setText("Ok");
              OkButton.setActionCommand("Ok");
              EditQuestionsPanel.add(OkButton);
              OkButton.setBounds(12,456,60,24);
              OkButton.setVisible(false);
              OkButton1.setText("Ok");
              OkButton1.setActionCommand("Ok");
              EditQuestionsPanel.add(OkButton1);
              OkButton1.setBounds(444,360,60,24);
              OkButton1.setVisible(false);
              CancelButton.setText("Cancel");
              CancelButton.setActionCommand("Cancel");
              EditQuestionsPanel.add(CancelButton);
              CancelButton.setBounds(84,456,73,24);
              CancelButton.setVisible(false);
              CancelButton1.setText("Cancel");
              CancelButton1.setActionCommand("Cancel");
              EditQuestionsPanel.add(CancelButton1);
              CancelButton1.setBounds(504,360,73,24);
              CancelButton1.setVisible(false);
              ShowRulesButton.setText("Show Rules");
              ShowRulesButton.setActionCommand("Show Rules");
              EditQuestionsPanel.add(ShowRulesButton);
              ShowRulesButton.setBounds(444,240,108,24);
              CloseButton.setText("Close");
              CloseButton.setActionCommand("Close");
              EditQuestionsPanel.add(CloseButton);
              CloseButton.setBounds(564,240,72,24);
              QuestionsLabel.setText("Questions");
              EditQuestionsPanel.add(QuestionsLabel);
              QuestionsLabel.setBounds(12,18,72,24);
              AnswersLabel.setText("Answers");
              EditQuestionsPanel.add(AnswersLabel);
              AnswersLabel.setBounds(444,12,60,36);
              EditQuestionsLabel.setText("Edit Questions");
              EditQuestionsPanel.add(EditQuestionsLabel);
              EditQuestionsLabel.setBackground(new java.awt.Color(204,204,204));
              EditQuestionsLabel.setBounds(12,276,90,48);
              EditQuestionsLabel.setVisible(false);
              NewQuestionsLabel.setText("New Questions");
              EditQuestionsPanel.add(NewQuestionsLabel);
              NewQuestionsLabel.setBounds(12,276,90,48);
              NewQuestionsLabel.setVisible(false);
              NewAnswersLabel.setText("New Answers");
              EditQuestionsPanel.add(NewAnswersLabel);
              NewAnswersLabel.setBounds(444,276,80,48);
              NewAnswersLabel.setVisible(false);
              EditAnswersLabel.setText("Edit Answers");
              EditQuestionsPanel.add(EditAnswersLabel);
              EditAnswersLabel.setBounds(444,276,80,48);
              EditAnswersLabel.setVisible(false);
              BorderLabel1.setBorder(etchedBorder1);
              EditQuestionsPanel.add(BorderLabel1);
              BorderLabel1.setBounds(5,12,643,264);
              BorderLabel2.setBorder(etchedBorder2);
              EditQuestionsPanel.add(BorderLabel2);
              BorderLabel2.setBounds(5,274,643,216);
              BorderLabel2.setVisible(false);
              //$$ etchedBorder1.move(0,540);
              //$$ etchedBorder2.move(24,540);
         QuestionsList.setModel(QuestionsModel);
         AnswersList.setModel(AnswersModel);
    //add all the listeners
    LAction LAction1 = new LAction();
         LSelector LSelector1 = new LSelector();
         //buttons
    CloseButton.addActionListener(LAction1);
    OkButton.addActionListener(LAction1);
    OkButton1.addActionListener(LAction1);
    DeleteAnswerButton.addActionListener(LAction1);
    DeleteQuestionButton.addActionListener(LAction1);
    NewAnswerButton.addActionListener(LAction1);
    NewQuestionButton.addActionListener(LAction1);
         EditQuestionButton.addActionListener(LAction1);
         EditAnswerButton.addActionListener(LAction1);
         CancelButton.addActionListener(LAction1);
         CancelButton1.addActionListener(LAction1);
    //ShowRulesButton.addActionListener(LAction1);
    //lists
         QuestionsList.addListSelectionListener(LSelector1);
         AnswersList.addListSelectionListener(LSelector1);
    //window
    this.addWindowListener(this);
         //{{DECLARE_CONTROLS
         javax.swing.JPanel EditQuestionsPanel = new javax.swing.JPanel();
         javax.swing.JScrollPane QuestionsPane = new javax.swing.JScrollPane();
         javax.swing.JList QuestionsList = new javax.swing.JList();
         javax.swing.JScrollPane AnswersPane = new javax.swing.JScrollPane();
         javax.swing.JList AnswersList = new javax.swing.JList();
         javax.swing.JScrollPane EditQuestionsPane = new javax.swing.JScrollPane();
         javax.swing.JTextArea EditQuestionsTextArea = new javax.swing.JTextArea();
         javax.swing.JTextField EditAnswersTextField = new javax.swing.JTextField();
         javax.swing.JButton DeleteQuestionButton = new javax.swing.JButton();
         javax.swing.JButton EditQuestionButton = new javax.swing.JButton();
         javax.swing.JButton NewQuestionButton = new javax.swing.JButton();
         javax.swing.JButton DeleteAnswerButton = new javax.swing.JButton();
         javax.swing.JButton EditAnswerButton = new javax.swing.JButton();
         javax.swing.JButton NewAnswerButton = new javax.swing.JButton();
         javax.swing.JButton OkButton = new javax.swing.JButton();
         javax.swing.JButton OkButton1 = new javax.swing.JButton();
         javax.swing.JButton CancelButton = new javax.swing.JButton();
         javax.swing.JButton CancelButton1 = new javax.swing.JButton();
         javax.swing.JButton ShowRulesButton = new javax.swing.JButton();
         javax.swing.JButton CloseButton = new javax.swing.JButton();
         javax.swing.JLabel QuestionsLabel = new javax.swing.JLabel();
         javax.swing.JLabel AnswersLabel = new javax.swing.JLabel();
         javax.swing.JLabel EditQuestionsLabel = new javax.swing.JLabel();
         javax.swing.JLabel NewQuestionsLabel = new javax.swing.JLabel();
         javax.swing.JLabel NewAnswersLabel = new javax.swing.JLabel();
         javax.swing.JLabel EditAnswersLabel = new javax.swing.JLabel();
         javax.swing.JLabel BorderLabel1 = new javax.swing.JLabel();
         javax.swing.JLabel BorderLabel2 = new javax.swing.JLabel();
         javax.swing.JOptionPane JOptionPane1 = new javax.swing.JOptionPane();
         javax.swing.JOptionPane JOptionPane2 = new javax.swing.JOptionPane();
         javax.swing.JOptionPane JOptionPane3 = new javax.swing.JOptionPane();
         javax.swing.JOptionPane JOptionPane4 = new javax.swing.JOptionPane();
         javax.swing.JOptionPane JOptionPane5 = new javax.swing.JOptionPane();
         javax.swing.JOptionPane JOptionPane6 = new javax.swing.JOptionPane();
         javax.swing.JOptionPane JOptionPane7 = new javax.swing.JOptionPane();
         com.symantec.itools.javax.swing.borders.EtchedBorder etchedBorder1 = new com.symantec.itools.javax.swing.borders.EtchedBorder();
         com.symantec.itools.javax.swing.borders.EtchedBorder etchedBorder2 = new com.symantec.itools.javax.swing.borders.EtchedBorder();
    public void getQuestionInfo()
    String SQL, line, QuestionID, info="";
    QuestionID = parseID(QuestionsList.getSelectedValue().toString());
    SQL = "SELECT Additional FROM ps_questions WHERE QuestionID = " + QuestionID;
    mydb.closeSQL();
    mydb.sendSQL(SQL);
    line = mydb.getRow();
    while (mydb.more())
    info = mydb.getColumn(0);
    line = mydb.getRow();
    YesNoDialog d = new YesNoDialog(this, "Additional Information for Question " + QuestionID, info, "OK", null, null);
    if (d.getAnswer() == d.YES)
    d.dispose();
    public void getAnswerInfo()
    String SQL, line, AnswerID, info="";
    AnswerID = parseID(AnswersList.getSelectedValue().toString());
    SQL = "SELECT Additional FROM ps_answers WHERE AnswerID = " + AnswerID;
    mydb.closeSQL();
    mydb.sendSQL(SQL);
    line = mydb.getRow();
    while (mydb.more())
    info = mydb.getColumn(0);
    line = mydb.getRow();
    YesNoDialog d = new YesNoDialog(this, "Additional Information for Answer " + AnswerID, info, "OK", null, null);
    if (d.getAnswer() == d.YES)
    d.dispose();
    public void getQuestions()
    String SQL, line;
    SQL = "SELECT QuestionID, QuestionText FROM tps_questions WHERE SchemaID = " + SchemaID + " ORDER BY QuestionID ASC";
    mydb.closeSQL();
    mydb.sendSQL(SQL);
    line = mydb.getRow();
    while (mydb.more())
    QuestionsModel.addElement("Q" + mydb.getColumn(0) + ": " + mydb.getColumn(1));
    line = mydb.getRow();
    public String parseID(String str)
    return str.substring(1, str.indexOf(":"));
    public void getAnswers()
    String SQL, line, QuestionID;
    String Question = QuestionsList.getSelectedValue().toString();
    AnswersModel.removeAllElements();
    QuestionID = parseID(Question);
    SQL = "SELECT AnswerID, AnswerText FROM tps_answers WHERE QuestionID = " + QuestionID;
    mydb.closeSQL();
    mydb.sendSQL(SQL);
    line = mydb.getRow();
    while (mydb.more())
    AnswersModel.addElement("A" + mydb.getColumn(0) + ": " + mydb.getColumn(1));
    line = mydb.getRow();
    public void setQuestion()
         EditAnswersTextField.setText("");
    String q = QuestionsList.getSelectedValue().toString();
    EditQuestionsTextArea.setText(q.substring(q.indexOf(":")+2, q.length()));
    public void setAnswer()
    String q = AnswersList.getSelectedValue().toString();
    EditAnswersTextField.setText(q.substring(q.indexOf(":")+2, q.length()));
    public String getNewID(String tableName, String fieldName)
    String SQL, line, newID;
    SQL = "";
    if (tableName.equals("tps_answers"))
    SQL = "SELECT MAX(AnswerID) FROM " + tableName;
    else if (tableName.equals("tps_questions"))
    SQL = "SELECT MAX(QuestionID) FROM " + tableName;
    mydb.closeSQL();
    mydb.sendSQL(SQL);
    line = mydb.getRow();
    int n = Integer.parseInt(mydb.getColumn(0).trim());
    n++;
    newID = n + "";
    return newID;
    public void addNewQuestion()
    //add to db and list
    int index;
    String q, QuestionID;
    q = EditQuestionsTextArea.getText();
    QuestionID = getNewID("tps_questions", "QuestionID");
    if (!(q.substring(q.length()-1, q.length())).equals("?"))
    q = q + "?";
    QuestionsModel.addElement("Q" + QuestionID + ": " + q);
    mydb.addRow("tps_questions");
    mydb.setColumn("QuestionID", QuestionID);
    mydb.setColumn("SchemaID", SchemaID);
    mydb.setColumn("QuestionText", "'" + q + "'");
    mydb.setColumn("Additional", "'null'");
    mydb.update();
         EditQuestionsTextArea.setText("");
         AnswersModel.removeAllElements();
         index = QuestionsModel.getSize();
         QuestionsList.setSelectedIndex(index-1);
    public void addEditQuestion()
         int i = QuestionsModel.indexOf(QuestionsList.getSelectedValue());
         String QuestionID = parseID(QuestionsList.getSelectedValue().toString());
         String q = EditQuestionsTextArea.getText();
              if (!(q.substring(q.length()-1, q.length())).equals("?"))
    q = q + "?";
         QuestionsModel.set(i, "Q" + QuestionID + ": " + q);
         mydb.editRow("tps_questions","QuestionID = " + QuestionID);
         mydb.setColumn("QuestionID", QuestionID);
    mydb.setColumn("SchemaID", SchemaID);
    mydb.setColumn("QuestionText", "'" + q + "'");
    mydb.setColumn("Additional", "'null'");
    mydb.update();
    public void addEditAnswer()
         String a, AnswerID, QuestionID;
    String q = QuestionsList.getSelectedValue().toString();
    a = EditAnswersTextField.getText();
    if (inDebugMode) System.err.println("a = " + a);
    QuestionID = parseID(q);
         int i = AnswersModel.indexOf(AnswersList.getSelectedValue());
    AnswerID = parseID(AnswersList.getSelectedValue().toString());
    AnswersModel.set(i, "A" + AnswerID + ": " + a);
    mydb.editRow("tps_answers","AnswerID = " + AnswerID);
    mydb.setColumn("QuestionID", QuestionID);
    mydb.setColumn("AnswerID", AnswerID);
    mydb.setColumn("SchemaId", SchemaID);
    mydb.setColumn("AnswerText", "'" + a + "'");
    mydb.setColumn("Additional", "'null'");
    mydb.update();
    // EditAnswersTextField.setText("");
    public void addNewAnswer()
    //getItems() method in List
    String a, AnswerID, QuestionID;
    String q = QuestionsList.getSelectedValue().toString();
    a = EditAnswersTextField.getText();
    if (inDebugMode) System.err.println("a = " + a);
    QuestionID = parseID(q);
    AnswerID = getNewID("tps_answers", "AnswerID");
    mydb.addRow("tps_answers");
    mydb.setColumn("QuestionID", QuestionID);
    mydb.setColumn("AnswerID", AnswerID);
    mydb.setColumn("SchemaId", SchemaID);
    mydb.setColumn("AnswerText", "'" + a + "'");
    mydb.setColumn("Additional", "'null'");
    mydb.update();
    AnswersModel.addElement("A" + AnswerID + ": " + a);
    EditAnswersTextField.setText("");
    //added 9-2-97 lmc - deletes an answer
    public void deleteAnswer(String answer)
    String msg;
    //getRulesA(answer);
    String Answer = AnswersList.getSelectedValue().toString();
    String AnswerID = answer.substring(1, answer.indexOf(":"));
    msg = "Are you sure you want to delete the answer:\n";
    msg += " \n";
    msg += AnswersList.getSelectedValue().toString() + " \n";
    msg += " \nThe following rules also use this question as a precondition.\n";
    //for (int i=0; i<rules.getLastVisibleIndex(); i++)
    // rules.setSelectedIndex(i);
    // msg += " \n rule " + rules.getSelectedIndex();
    msg += " \n \nDeleting the answer will affect these rules.";
    YesNoDialog confirm = new YesNoDialog(this, "Delete Answer " + AnswerID, msg, "Delete", "Cancel", null);
    if (confirm.getAnswer() == confirm.YES)
    mydb.deleteRow("tps_answers", "AnswerID=" + AnswerID);
    mydb.deleteRow("tps_preconditions", "AnswerID=" + AnswerID);
    AnswersModel.removeElementAt(AnswersList.getSelectedIndex());
    else System.err.println("did not delete");
    public void deleteQuestion(String question)
    String msg, SQL, line;
    String QuestionID = question.substring(1, question.indexOf(":"));
    //getRulesQ(question);
    msg = "Are you sure you want to delete the question:\n";
    msg += " \n";
    msg += QuestionsList.getSelectedValue().toString() + " \n";
    msg += " \nThe following rules also use this question as a precondition.\n";
    //for (int i=0; i<rules.getLastVisibleIndex(); i++)
    // rules.setSelectedIndex(i);
    // msg += " \n rule " + rules.getSelectedIndex();
    msg += " \n \nDeleting the question will affect these rules.";
    YesNoDialog confirm = new YesNoDialog(this, "Delete Question " + QuestionID, msg, "Delete", "Cancel", null);
    if (confirm.getAnswer() == confirm.YES)
    mydb.deleteRow("tps_questions", "QuestionID=" + QuestionID);
    SQL = "SELECT QuestionID FROM tps_answers WHERE QuestionID=" + QuestionID;
    mydb.sendSQL(SQL);
    line = mydb.getRow();
    while (mydb.more())
    mydb.deleteRow("tps_answers", "QuestionID=" + QuestionID);
    line = mydb.getRow();
    QuestionsModel.removeElementAt(QuestionsList.getSelectedIndex());
    AnswersModel.removeAllElements();
         EditQuestionsTextArea.setText("");          
    else System.err.println("did not delete");
    public void showRules(String question)
    ListFrame allRules;
    String QuestionID = question.substring(1, question.indexOf(":"));
    allRules = new ListFrame("All the Rules that Contain Question " + QuestionID, "Q", question, rules);
    allRules.show();
    /* //added 2/18/01 srh to make the "Show Rules" button work
    public void showRules(String question, String answer)
    ListFrame allRules;
    java.awt.List matchingRules = new java.awt.List();
    String listId, type="", SQL, line;
    if (question != null)
    {  listId = question.substring(1, question.indexOf(":"));
    type = "Quesiton";
    else if (answer != null)
    {  listId = answer.substring(1, question.indexOf(":"));
    type = "Answer";
    else
    {  //AppletGlobals.eval("alert('You must choose a quesiton or answer to display.')");
    alert = new YesNoDialog(this, "Add Answer ...", "You must choose a quesiton or answer to display.", "OK", null, null);
    return;
    SQL = "SELECT RuleID FROM tps_preconditions WHERE PreQuestionId = "+ listId;
    mydb.closeSQL();
    mydb.sendSQL(SQL);
    line = mydb.getRow();
    while (mydb.more())
    matchingRules.add(mydb.getColumn(0));
    line = mydb.getRow();
    allRules = new ListFrame("All the Rules that Contain "+type+" " + listId, "P", question, matchingRules);
    allRules.show();
    public void getRulesQ(String question)
    String SQL, line;
    String QuestionID;
         rules = new javax.swing.Jlist();
    QuestionID = question.substring(1, question.indexOf(":"));
    SQL = "SELECT RuleID FROM tps_preconditions WHERE PreQuestionID=" + QuestionID;
    mydb.closeSQL();
    mydb.sendSQL(SQL);
    line = mydb.getRow();
    while (mydb.more())
    rules.add(mydb.getColumn(0));
    line = mydb.getRow();
    public void getRulesA(String answer)
    String SQL, line;
    String AnswerID;
    rules = new javax.swing.Jlist();
    AnswerID = answer.substring(1, answer.indexOf(":"));
    SQL = "SELECT RuleID FROM tps_preconditions WHERE AnswerID=" + AnswerID;
    mydb.closeSQL();
    mydb.sendSQL(SQL);
    line = mydb.getRow();
    while (mydb.more())
    rules.add(mydb.getColumn(0));
    line = mydb.getRow();
         //ActionListener method
         class LAction implements java.awt.event.ActionListener
    public void actionPerformed(java.awt.event.ActionEvent event)
         Object object = event.getSource();
              if (object == CloseButton)
              dispose();
              else if (object == NewQuestionButton)
                        flagQ = 0;
                        setSize(660,550);
                        psRulesEditQ.this.setVisible(true);
                        //QuestionsList.setEnabled(false);
                        EditQuestionsLabel.setVisible(false);
                        NewAnswersLabel.setVisible(false);
                        EditAnswersLabel.setVisible(false);
                        EditAnswersTextField.setVisible(false);
              OkButton1.setVisible(false);
                        CancelButton1.setVisible(false);
                        BorderLabel2.setVisible(true);
                        CancelButton.setVisible(true);
                        NewQuestionsLabel.setVisible(true);
                        EditQuestionsPane.setVisible(true);
              EditQuestionsTextArea.setText("");
                        OkButton.setVisible(true);
                        //setSize(670,551);
                        //psRulesEditQ.this.getContentPane().setSize(670,551);
                        //EditQuestionsPane.repaint();
              else if (object == NewAnswerButton)
                        flagA = 0;
                        EditAnswersLabel.setVisible(false);          
                        NewQuestionsLabel.setVisible(false);
                        EditQuestionsLabel.setVisible(false);
                        EditQuestionsPane.setVisible(false);
                        OkButton.setVisible(false);
                        CancelButton.setVisible(false);
                             if (QuestionsList.isSelectionEmpty())
                             JOptionPane5.showMessageDialog(psRulesEditQ.this, "Select the question first!","Message",JOptionPane.PLAIN_MESSAGE);
                             else
                             setSize(660,550);
                             psRulesEditQ.this.setVisible(true);
                             BorderLabel2.setVisible(true);
                             //QuestionsList.setEnabled(true);
                             NewAnswersLabel.setVisible(true);
                             EditAnswersTextField.setVisible(true);
                   EditAnswersTextField.setText("");
                             OkButton1.setVisible(true);
                             CancelButton1.setVisible(true);
                   else if (object == EditQuestionButton)
                        flagQ = 1;
                        //QuestionsList.setEnabled(true);
                        NewQuestionsLabel.setVisible(false);
                        NewAnswersLabel.setVisible(false);
                        EditAnswersLabel.setVisible(false);
                        EditAnswersTextField.setVisible(false);
              OkButton1.setVisible(false);
                        CancelButton1.setVisible(false);
                        EditQuestionsLabel.setVisible(true);
                             if (QuestionsList.isSelectionEmpty())
                             JOptionPane2.showMessageDialog(psRulesEditQ.this, "Select a question to edit!","Message",JOptionPane.PLAIN_MESSAGE);
                             else
                             setSize(660,550);
                             psRulesEditQ.this.setVisible(true);
                             BorderLabel2.setVisible(true);
                             EditQuestionsPane.setVisible(true);     
                             OkButton.setVisible(true);
                             CancelButton.setVisible(true);
                             setQuestion();
                   else if (object == EditAnswerButton)
                        flagA = 1;
                        NewQuestionsLabel.setVisible(false);
                        NewAnswersLabel.setVisible(false);
                        EditQuestionsLabel.setVisible(false);
                        EditQuestionsPane.setVisible(false);
                        OkButton.setVisible(false);
                        CancelButton.setVisible(false);
                        EditAnswersLabel.setVisible(true);
                             if (AnswersList.isSelectionEmpty())
                             JOptionPane3.showMessageDialog(psRulesEditQ.this, "Select an answer to edit!","Message",JOptionPane.PLAIN_MESSAGE);
                             else
                             setSize(660,550);
                             psRulesEditQ.this.setVisible(true);
                             BorderLabel2.setVisible(true);
                             EditAnswersTextField.setVisible(true);
                             OkButton1.setVisible(true);
                             CancelButton1.setVisible(true);
                             setAnswer();
              else if (object == OkButton)
                   if (flagQ == 0)
                                  String x = EditQuestionsTextArea.getText();
                                  if (x.equals(""))
                                  JOptionPane6.showMessageDialog(psRulesEditQ.this, "You must type in a question first!","Message",JOptionPane.PLAIN_MESSAGE);
                                  else
                                  addNewQuestion();
                                  QuestionsList.setEnabled(true);
                             else if (flagQ == 1)
                             addEditQuestion();
                             setSize(660,330);
                             BorderLabel2.setVisible(false);
                             NewQuestionsLabel.setVisible(false);
                             EditQuestionsLabel.setVisible(false);
                             EditQuestionsPane.setVisible(false);
                             OkButton.setVisible(false);
                             CancelButton.setVisible(false);
              else if (object == OkButton1)
                             if (flagA == 0)
                                  String y = EditAnswersTextField.getText();
                                  if (y.equals(""))
                                  JOptionPane7.showMessageDialog(psRulesEditQ.this, "You must type in an answer first!","Message",JOptionPane.PLAIN_MESSAGE);
                                  else
                                  addNewAnswer();     
                             else if (flagA == 1)
                             addEditAnswer();
                             setSize(660,330);
                             BorderLabel2.setVisible(false);
                             NewAnswersLabel.setVisible(false);
                             EditAnswersLabel.setVisible(false);
                             EditAnswersTextField.setVisible(false);
                   OkButton1.setVisible(false);
                             CancelButton1.setVisible(false);
              else if (object == DeleteQuestionButton)
                             if (QuestionsList.isSelectionEmpty())
                             JOptionPane1.showMessageDialog(psRulesEditQ.this, "Select a question to delete!","Message",JOptionPane.PLAIN_MESSAGE);
              BorderLabel2.setVisible(false);
                        NewQuestionsLabel.setVisible(false);
                        EditQuestionsLabel.setVisible(false);
                        EditQuestionsPane.setVisible(false);
                        OkButton.setVisible(false);
                        CancelButton.setVisible(false);
                        CancelButton1.setVisible(false);
                        NewAnswersLabel.setVisible(false);
                        EditAnswersLabel.setVisible(false);
                        EditAnswersTextField.setVisible(false);
              OkButton1.setVisible(false);
                        deleteQuestion(QuestionsList.getSelectedValue().toString());
              else if (object == DeleteAnswerButton)
                   if (AnswersList.isSelectionEmpty())
                             JOptionPane4.showMessageDialog(psRulesEditQ.this, "Select an answer to delete!","Message",JOptionPane.PLAIN_MESSAGE);
                        BorderLabel2.setVisible(false);
                        NewQuestionsLabel.setVisible(false);
              EditQuestionsLabel.setVisible(false);
                        EditQuestionsPane.setVisible(false);
                        OkButton.setVisible(false);
                        CancelButton.setVisible(false);
                        CancelButton1.setVisible(false);
                        NewAnswersLabel.setVisible(false);
                        EditAnswersLabel.setVisible(false);
                        EditAnswersTextField.setVisi

    Hi,
    I have a JApplet with JComponents. When the size of the JApplet is larger than the browser, scrollbar of the browser is used. Flickering is very worse when scrolled. Any help in this regard is appreciated.
    Kiru

  • URL class is not being garbage collected

    I have created two instances of the URL class to specify a file location for each image. I use com.symantec.itools.javax.swing.icons.ImageIcon class to display images specified by each URL instance as icons inside a button. The setImageLocation method(URL location) of the ImageIcon class sets the location to be displayed by this icon. The following is the code snippets used to create the ImageIcon instances:
    private URL greenIconURL;
    private URL redIconURL;
    com.symantec.itools.javax.swing.icons.ImageIcon green_icon = new com.symantec.itools.javax.swing.icons.ImageIcon();
    com.symantec.itools.javax.swing.icons.ImageIcon red_icon = new com.symantec.itools.javax.swing.icons.ImageIcon();
    try
    greenIconURL = new java.net.URL
    ("file:./images/greenline.gif");
    green_icon.setImageLocation(greenIconURL);
    catch (java.net.MalformedURLException error) { }
    try
    redIconURL = new java.net.URL
    ("file:./images/redline.gif");
    red_icon.setImageLocation(redIconURL);
    catch (java.net.MalformedURLException error) { }
    I am using JProbe 5.0.1 Memory to determine the loitering objects when I remove the button from the JInternalFrame. I am using Java 1.2.2_08 version. The JProbe Memory Leak Doctor indicates that each URL instance has a reference to an entry in a HashMap table. The reference graph from the root set has a reference to SoftCache to HashMap to HashMap$Entry. To make this URL instance eligible for garbage collection, JProbe Memory Leak Doctor indicates I must remove the entry from the HashMap. How do I get access to this HashMap to remove the entry? If this is a problem with the version of the JDK, please let me know. Thank you in advance for your assistance.

    <root>Statics
    -->sun.misc.SoftCache->java.util.HashMap->java.util.Has
    Map$Entry[]->java.util.HashMap$Entry->java.net.URL
    I do not an instance of HashMap in my class.
    Therefore, the HashMap is either created by URLclass
    or the
    com.symantec.itools.javax.swing.icons.ImageIcon
    class.SoftCache seems to have a normal HashMap inside
    it/* Hash table mapping keys to ValueCells */
    private Map hash;but if that is the HashMap in JProbe
    information then the URL would have to be a key in
    the map - otherwise there'd be another object in the
    chain of class SoftCache.ValueCell
    are you certain that the java.net.URL's in that
    hashmap are your ones?
    out of curiosity - are you certain that the URL's are
    the/a problem (are you getting an OutOfMemoryError?)
    asjfThe button that contains the URL's is the only one on the JInternalFrame. The JProbe Memory Debugger displays the java.net package name, the URL class name, the count (2), and the Count Change (+2). When I remove the button from the JInternalFrame, the aforementioned numbers on the Instance Summary remain the same. The snapshot of the Java Heap reveals that the two instances of the URL class are still there. The Memory Leak Doctor shows the reference graph from the root set:
    <root>Statics->SoftCache->HashMap->HashMap$Entry[]->HashMap$Entry->URL
    When I right click on the arrow between HashMap$Entry[] and HashMap$Entry to remove the reference, I receive the message: "Congratulations this object can be garbage collected..." It appears like private instance of Map in SoftCache is holding a strong reference.
    I am not getting an OutOfMemoryError exception.

  • Java update 13

    System : PIX 506E ver 6.3(5) PDM 3.0(4)
    XP SP3
    Firefox 3.0.8 and IE 6 BOTH have the same result so it is not a browser setting.
    JRE 6 update 11 would log errors but open the PDM. Updating java uninstalls update 11 and installs update 13. This update also logs errors (ArrayIndexOutOfBoundsException) but the PDM fails to open. Full error at the end.
    Is there any way to use update 13? All other apps that I use that run under java are running fine. I would like to have all the machines in the company with the same versions of SW.
    Brian
    ==== Java errors ====
    Java 6 update 11 and PDM opens
    Exception in thread "AWT-EventQueue-2" java.lang.NullPointerException
    at com.cisco.nm.util.sgz.Loader.repaint(Loader.java:128)
    at sun.java2d.d3d.D3DScreenUpdateManager$2.run(Unknown Source)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    Java 6 updates 12 & 13 and PDM does NOT open.
    java.lang.ArrayIndexOutOfBoundsException: No such child: 0
    at java.awt.Container.getComponent(Unknown Source)
    at symantec.itools.b.n.getComponent(Unknown Source)
    at java.awt.Component.calculateCurrentShape(Unknown Source)
    at java.awt.Component.applyCurrentShape(Unknown Source)
    at java.awt.Component.mixOnShowing(Unknown Source)
    at java.awt.Component.addNotify(Unknown Source)
    at java.awt.Label.addNotify(Unknown Source)
    at java.awt.Container.addNotify(Unknown Source)
    at java.awt.Panel.addNotify(Unknown Source)
    at symantec.itools.b.n.addNotify(Unknown Source)
    at java.awt.Container.addNotify(Unknown Source)
    at java.awt.Panel.addNotify(Unknown Source)
    at java.awt.Container.addNotify(Unknown Source)
    at java.awt.Panel.addNotify(Unknown Source)
    at java.awt.Container.addNotify(Unknown Source)
    at java.awt.Panel.addNotify(Unknown Source)
    at symantec.itools.b.n.addNotify(Unknown Source)
    at java.awt.Container.addNotify(Unknown Source)
    at java.awt.Panel.addNotify(Unknown Source)
    at java.awt.Container.addNotify(Unknown Source)
    at java.awt.Panel.addNotify(Unknown Source)
    at java.awt.Container.addNotify(Unknown Source)
    at java.awt.Panel.addNotify(Unknown Source)
    at java.awt.Container.addNotify(Unknown Source)
    at java.awt.Panel.addNotify(Unknown Source)
    at java.awt.Container.addNotify(Unknown Source)
    at java.awt.Panel.addNotify(Unknown Source)
    at java.awt.Container.addNotify(Unknown Source)
    at java.awt.Panel.addNotify(Unknown Source)
    at java.awt.Container.addNotify(Unknown Source)
    at java.awt.Window.addNotify(Unknown Source)
    at java.awt.Frame.addNotify(Unknown Source)
    at java.awt.Window.show(Unknown Source)
    at com.cisco.pdm.PDMApplet.start(Unknown Source)
    at com.cisco.nm.util.sgz.Env.start(Env.java:37)
    at com.cisco.nm.util.sgz.Loader.start(Loader.java:109)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Exception: java.lang.ArrayIndexOutOfBoundsException: No such child: 0

    Symptom Intermittently, while using Microsoft Internet Explorer, a message box stating DDHelp caused an invalid page fault in module at ... appears after RTR has been running for awhile. Subsequently, the machine pauses indefinitely.
    Possible Cause The DirectDraw function in the Java Runtime Environment (JRE) causes interruption to the video driver, as related in Bug4713003 reported by Sun Microsystems.
    Recommended Action Upgrade Internet Explorer to version 5.5SP2. If the problem persists, go to Start > Settings > Control Panel open the Java Plug-in panel and add -Dsun.java2d.noddraw=true flag as a parameter.

  • StackOverFlow Error in IE 5.0 and IE 5.5

    I am using symentic TreeView and TreeNode in my applet when no. of Node at particular node greater than 6000 it's giving stackoverflowerror. This problem is occured in IE5.0 and IE 5.5. It is working fine in IE 6.0.
    Error description is
    Exception occurred during event dispatching:
    java.lang.StackOverflowError
         at java/util/Vector.addElement
         at symantec/itools/awt/TreeView.vectorize
         at symantec/itools/awt/TreeView.vectorize
         at symantec/itools/awt/TreeView.vectorize
         at symantec/itools/awt/TreeView.vectorize
         at symantec/itools/awt/TreeView.vectorize
         at symantec/itools/awt/TreeView.vectorize
         at symantec/itools/awt/TreeView.vectorize
         at symantec/itools/awt/TreeView.vectorize
         at symantec/itools/awt/TreeView.vectorize
    How i know that different between IE5.5 and IE6.0 (VM)
    Any Method is there which update IE 5.5 VM smilar to IE6.0 ?

    Hi,
    It is indeed the allocations are exceeding the max which the process can have(JVM),I wanted to know do you require so much of stack for the java program(Applet)?
    regards vickyk

  • Sound in java

    i want to use event sounds & backround sounds
    can you help me with that??

    Hope this helps some:
    java.lang.Object
    |
    +----symantec.itools.multimedia.SoundPlayer
    public class SoundPlayer
    implements Serializable
    SoundPlayer component. This component allows the playing of a list of sound clips either serially or simultaneously. The sound information is 8-bit 8000hz u-law encoded data.
    Index of Public Members
    Public Variables
    INFINITE
    A constant specifying that the sound should run forever.
    Public Constructors
    SoundPlayer()
    Constructs a SoundPlayer.
    Public Methods
    addPropertyChangeListener(PropertyChangeListener listener)
    Adds a listener for all event changes.
    addStringURL(String url)
    Appends the sound clip data at the specified URL to the current list of sound clips.
    addURL(URL u)
    Appends the sound clip data at the specified URL to the current list of sound clips.
    addVetoableChangeListener(VetoableChangeListener listener)
    Adds a vetoable listener for all event changes.
    getRepeat()
    Gets the number of times the list of sound clips is played.
    getSyncMode()
    Deprecated.
    getURLList()
    Gets the URL of each sound clip.
    isSyncMode()
    Returns the number of times the list of sound clips is played.
    play()
    Starts playing the sound clips.
    removePropertyChangeListener(PropertyChangeListener listener)
    Removes a listener for all event changes.
    removeVetoableChangeListener(VetoableChangeListener listener)
    Removes a vetoable listener for all event changes.
    setRepeat(int c)
    Sets the number of times the list of sound clips is played.
    setSyncMode(boolean newSyncMode)
    Sets whether to play the sound clips one after the other, or all simultaneously.
    setURLList(URL[] list)
    Initializes the list of sound clips using the given list of sound clip data URLs.
    stop()
    Immediately stops the playing of sound clips.
    stop(int delay)
    Stops the playing of sound clips after the specified number of milliseconds.

  • Code generation using Visual cafe

    I'm using visual cafe for GUI development. It includes it's own libraries though the equivalent ones are available in JDK.
    For example: to place a component in GRid Bag layout it generates code with symantec's constructor
    new com.symantec.itools.awt.GridBagConstraintsD(,...) instead of java.awt.GridBagContraints(,...) constructor.
    Is there any way to tell Visualcafe to use jdk instead of it's own libraries when applicable? let me know if anyone knows how to do this?
    thanks,
    sampath

    The simple answer is NO, or its not simple nor reliable.
    The unsolicited answer is; stop using that garbage. I used it for 4 years. Symantec completely dropped the ball. I use the free Jbuilder version. It uses ALL official classes and does NOT force you into code conventions, nor does it complain about many things. VC has its own private section in the code where you can not manually edit it. headache. VC does geenrate much less anonymous classes, but all in all, try JBuilder. Maybe even Forte as I hear good things about that too.
    When I converted to JBuilder, I simply changed the symanted gridbag class into the sun gridbag class. In general the symantec class is EXACTLY the same, but symantec was ahead of its time, and needed to make its own classes in order to have the GUI editing since sun didnt have completel beans available at the time. But sun has not privided these beans for years, and still symantec has not adapted. I think they are arrogant now and hope this keeps you forced into their IDE since changing seems hard(though "replace" works just fine in these situations)...

Maybe you are looking for