Problem in LookAndFeel

Hi All,
i have a small problem in LookAndFeel for my Tree. in our project we are using JDK1.1.7B and Swing1.0..It is a client requirement..Is it possible to cretae my tree like windows Explorer..i am not geting tree structure..just i am geting bullets for tree and subtree , I am not geting link to leaf nodes from subtree and link from main leafs to main root...why..i used
public static String windowsUI = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
try {     
UIManager.setLookAndFeel(windowsUI);     
UIDefaults def = UIManager.getDefaults();     
for (Enumeration e = def.keys(); e.hasMoreElements();)
{  String key = (String)e.nextElement();     
System.out.println(key+ ":"+def.get(key));
}catch (Exception ex)
System.out.println(ex);     
..........and i tried this also
try{
UIManager.setInstalledLookAndFeels(UIManager.getInstalledLookAndFeels());
          }catch(Exception e){System.out.println("Exception "+e);}
but i am geting exception like this
Exception occurred during event dispatching:
java.lang.NoSuchMethodError: com.sun.java.swing.plaf.windows.WindowsTreeUI$Expan
dedIcon: method createExpandedIcon()Lcom/sun/java/swing/Icon; not found
at
at com.sun.java.swing.UIDefaults.get(Compiled Code)
at com.sun.java.swing.MultiUIDefaults.get(Compiled Code)
at PopLayersCompHashAllTree.popupLayers(Compiled Code)
at PopLayersCompHashAllTree.<init>(PopLayersCompHashAllTree.java:38)
at MapSketchDelAll.actionPerformed(MapSketchDelAll.java:217)
at com.sun.java.swing.AbstractButton.fireActionPerformed(Compiled Code)
at com.sun.java.swing.AbstractButton$ForwardActionEvents.actionPerformed
(AbstractButton.java:924)
at com.sun.java.swing.DefaultButtonModel.fireActionPerformed(Compiled Co
de)
at com.sun.java.swing.DefaultButtonModel.setPressed(DefaultButtonModel.j
ava:230)
at com.sun.java.swing.plaf.basic.BasicButtonListener.mouseReleased(Basic
ButtonListener.java:191)
at java.awt.Component.processMouseEvent(Component.java:2354)
at java.awt.Component.processEvent(Compiled Code)
at java.awt.Container.processEvent(Compiled Code)
at java.awt.Component.dispatchEventImpl(Compiled Code)
at java.awt.Container.dispatchEventImpl(Compiled Code)
at java.awt.Component.dispatchEvent(Compiled Code)
at java.awt.LightweightDispatcher.retargetMouseEvent(Compiled Code)
at java.awt.LightweightDispatcher.processMouseEvent(Compiled Code)
at java.awt.LightweightDispatcher.dispatchEvent(Compiled Code)
at java.awt.Container.dispatchEventImpl(Compiled Code)
at java.awt.Window.dispatchEventImpl(Compiled Code)
at java.awt.Component.dispatchEvent(Compiled Code)
at java.awt.EventDispatchThread.run(Compiled Code)

you are probably setting the LookAndFeel in the wrong spot in your code. You should set it every time your window reopens instead of just in the initialization.

Similar Messages

  • Problem in LookAndFeel(..JTree..)

    Hi All,
    i have a small problem in LookAndFeel for my Tree. in our project we are using JDK1.1.7B and Swing1.0..It is a client requirement..Is it possible to cretae my tree like windows Explorer..i am not geting tree structure..just i am geting bullets for tree and subtree , I am not geting link to leaf nodes from subtree and link from main leafs to main root...why..i used
    public static String windowsUI = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
    try {
    UIManager.setLookAndFeel(windowsUI);
    UIDefaults def = UIManager.getDefaults();
    for (Enumeration e = def.keys(); e.hasMoreElements();)
    { String key = (String)e.nextElement();
    System.out.println(key+ ":"+def.get(key));
    }catch (Exception ex)
    System.out.println(ex);
    ..........and i tried this also
    try{
    UIManager.setInstalledLookAndFeels(UIManager.getInstalledLookAndFeels());
    }catch(Exception e){System.out.println("Exception "+e);}
    but i am geting exception like this
    Exception occurred during event dispatching:
    java.lang.NoSuchMethodError: com.sun.java.swing.plaf.windows.WindowsTreeUI$Expan
    dedIcon: method createExpandedIcon()Lcom/sun/java/swing/Icon; not found
    at
    at com.sun.java.swing.UIDefaults.get(Compiled Code)
    at com.sun.java.swing.MultiUIDefaults.get(Compiled Code)
    at PopLayersCompHashAllTree.popupLayers(Compiled Code)
    at PopLayersCompHashAllTree.<init>(PopLayersCompHashAllTree.java:38)
    at MapSketchDelAll.actionPerformed(MapSketchDelAll.java:217)
    at com.sun.java.swing.AbstractButton.fireActionPerformed(Compiled Code)
    at com.sun.java.swing.AbstractButton$ForwardActionEvents.actionPerformed
    (AbstractButton.java:924)
    at com.sun.java.swing.DefaultButtonModel.fireActionPerformed(Compiled Co
    de)
    at com.sun.java.swing.DefaultButtonModel.setPressed(DefaultButtonModel.j
    ava:230)
    at com.sun.java.swing.plaf.basic.BasicButtonListener.mouseReleased(Basic
    ButtonListener.java:191)
    at java.awt.Component.processMouseEvent(Component.java:2354)
    at java.awt.Component.processEvent(Compiled Code)
    at java.awt.Container.processEvent(Compiled Code)
    at java.awt.Component.dispatchEventImpl(Compiled Code)
    at java.awt.Container.dispatchEventImpl(Compiled Code)
    at java.awt.Component.dispatchEvent(Compiled Code)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Compiled Code)
    at java.awt.LightweightDispatcher.processMouseEvent(Compiled Code)
    at java.awt.LightweightDispatcher.dispatchEvent(Compiled Code)
    at java.awt.Container.dispatchEventImpl(Compiled Code)
    at java.awt.Window.dispatchEventImpl(Compiled Code)
    at java.awt.Component.dispatchEvent(Compiled Code)
    at java.awt.EventDispatchThread.run(Compiled Code)
    Thanks in Advance,
    Regards
    Akula

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

  • Problems about LookAndFeel

    I meet a problem when I write GUI using Swing component.
    This problem can be descriped as below:
    When I run the application when its LookAndFeel is Metal,no problem.But when I run it when its LookAndFeel is Window,the focus disappear after I click the MenuItem or Popupmenu!!!
    Why???
    Anyone has an solution for this bug?
    My application is OK in JDK1.3,it meet this problem in JDK1.4.

    I meet a problem when I write GUI using Swing component.
    This problem can be descriped as below:
    When I run the application when its LookAndFeel is Metal,no problem.But when I run it when its LookAndFeel is Window,the focus disappear after I click the MenuItem or Popupmenu!!!
    Why???
    Anyone has an solution for this bug?
    My application is OK in JDK1.3,it meet this problem in JDK1.4.

  • LookAndFeel in JTree

    Hi All,
    i have a small problem in LookAndFeel for my Tree. in our project we are using JDK1.1.7B and Swing1.0..It is a client requirement..Is it possible to cretae my tree like windows Explorer..i am not geting tree structure..just i am geting bullets for tree and subtree , I am not geting link to leaf nodes from subtree and link from main leafs to main root...why..i used
    public static String windowsUI = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
    try {
    UIManager.setLookAndFeel(windowsUI);
    UIDefaults def = UIManager.getDefaults();
    for (Enumeration e = def.keys(); e.hasMoreElements();)
    { String key = (String)e.nextElement();
    System.out.println(key+ ":"+def.get(key));
    }catch (Exception ex)
    System.out.println(ex);
    ..........and i tried this also
    try{
    UIManager.setInstalledLookAndFeels(UIManager.getInstalledLookAndFeels());
    }catch(Exception e){System.out.println("Exception "+e);}
    but i am geting exception like this
    Exception occurred during event dispatching:
    java.lang.NoSuchMethodError: com.sun.java.swing.plaf.windows.WindowsTreeUI$Expan
    dedIcon: method createExpandedIcon()Lcom/sun/java/swing/Icon; not found
    at
    at com.sun.java.swing.UIDefaults.get(Compiled Code)
    at com.sun.java.swing.MultiUIDefaults.get(Compiled Code)
    at PopLayersCompHashAllTree.popupLayers(Compiled Code)
    at PopLayersCompHashAllTree.<init>(PopLayersCompHashAllTree.java:38)
    at MapSketchDelAll.actionPerformed(MapSketchDelAll.java:217)
    at com.sun.java.swing.AbstractButton.fireActionPerformed(Compiled Code)
    at com.sun.java.swing.AbstractButton$ForwardActionEvents.actionPerformed
    (AbstractButton.java:924)
    at com.sun.java.swing.DefaultButtonModel.fireActionPerformed(Compiled Co
    de)
    at com.sun.java.swing.DefaultButtonModel.setPressed(DefaultButtonModel.j
    ava:230)
    at com.sun.java.swing.plaf.basic.BasicButtonListener.mouseReleased(Basic
    ButtonListener.java:191)
    at java.awt.Component.processMouseEvent(Component.java:2354)
    at java.awt.Component.processEvent(Compiled Code)
    at java.awt.Container.processEvent(Compiled Code)
    at java.awt.Component.dispatchEventImpl(Compiled Code)
    at java.awt.Container.dispatchEventImpl(Compiled Code)
    at java.awt.Component.dispatchEvent(Compiled Code)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Compiled Code)
    at java.awt.LightweightDispatcher.processMouseEvent(Compiled Code)
    at java.awt.LightweightDispatcher.dispatchEvent(Compiled Code)
    at java.awt.Container.dispatchEventImpl(Compiled Code)
    at java.awt.Window.dispatchEventImpl(Compiled Code)
    at java.awt.Component.dispatchEvent(Compiled Code)
    at java.awt.EventDispatchThread.run(Compiled Code)

    This bug is fixed in 1.5 and there is a workaround available for 1.4.2. See bug report:
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4887931

  • LookAndFeel TextArea Problem

    I've been creating custom LookAndFeel classes and everything appears
    fine except for one problem... After I enter some text into a JTextArea
    (when using a custom LookAndFeel), I cannot delete characters or use
    the Backspace key to remove characters. After I switch back to Motif
    or the default Windows LookAndFeel, I am able to delete characters and
    use the backspace key as it was meant to be used.
    Haven't found any info regarding this problem. Has anyone had this
    problem previously, or does anyone have a possible solution?

    As luck would have it, just after I post a question, I find a
    solution to my own problem.
    Instead of extending BasicLookAndFeel, I extended
    MotifLookAndFeel.

  • Problems whit the LookAndFeel

    Hi, i'm creating a GUI using Netbeans (windows xp), I want to use the cross plataform look and feel, so i write this code:
    public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    try {
                       UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
                    } catch(Exception e) {
                    System.out.println("Couldn't use that look and feel.");
                    setDefaultLookAndFeelDecorated(true);
                    new NumeroCiclos().setVisible(true);
        }It work's OK, this is the picture of the window:
    http://i55.photobucket.com/albums/g143/joserafa83/MetalLnF.jpg
    But when i use the JOptionPane the look and feel is like the windows xp:
    http://i55.photobucket.com/albums/g143/joserafa83/errorLnF.jpg
    String time = jTextTime.getText();
            String freq = jTextFrequency.getText();
            double t = 0;
           try
                t = Double.parseDouble(time);
           catch(NumberFormatException e)
              JOptionPane.showMessageDialog(null,"cuidado","Error",JOptionPane.ERROR_MESSAGE);
               jTextTime.requestFocus();
           }        What can I do to fix this look and feel problem??
    Thanks

    When you change the look and feel I think you have to update the Component tree with
    SwingUtilities.updateComponentTreeUI(Component c)or the component you changed the look and feel of will have the new look and feel, and some or all of its child components will retain their previous look and feel. I think as of either JDK 5 or 6, the default look and feel is the native one returned by
    UIManager.getSystemLookAndFeelClassName()(I'm not completely sure about this) which means until you make the call above, some or all of the child components will have the native look and feel and the component itself will have the cross platform look and feel.
    For more information about the Swing architecture, visit Sun's "A Swing Architecture Overview" at:
    http://java.sun.com/products/jfc/tsc/articles/architecture/

  • JTableHeader and LookAndFeel problem

    need help in solving the following problems
    1. i have a JTable that i want to display information in the table header from a JTextField am using to input data.please how do i handle it.
    inputfield = new JTextField(20);
    tablemodel = new DefaultTable();
    tablemodel.addColumn("Number");
    tablemodel.addColumn("Food Item");
    tablemodel.addColumn("Quantity");
    tablemodel.addColumn("Price");
    tablemodel.addColumn("Description");
    table = new JTable(tablemodel);
    TableColumn column = null;
    for (int i = 0; i < 5; i++) {
    column = table.getColumnModel().getColumn(i);
    if(i==0){
    column.setPreferredWidth(65);
    } else if(i==1){
    column.setPreferredWidth(100);
    } else if(i==2){
    column.setPreferredWidth(65);
    } else if(i==3){
    column.setPreferredWidth(65);
    } else{
    column.setPreferredWidth(100);
    2.need help in the Look and Feel of my JFrame have the look of a glass.please somebody tell to do this.
    thanks in advance.

    You are having five columns,
    which header should get a input from JTextfield,
    1. all the Five? or else some specific header?
    2. Is the table having the header when intially its load?
    3. when it should happen, like the user enter the heading in the text field and pressing enter button?
    4. When the user enter the 6th text and press enter key, what supposed to be happen?
    So pls describe what you want properly.
    For your second question u can use GlassPane

  • LookAndFeel Problem

    Hi, I've created a JFrame which contains a JMenu. Each time an item in the menu is selected an internal frame is opened. I've also a menu to change the lookNfeel of my appln at runtime.
    My problem is that if I open an InternalFrame 'A' and then change my lookNFeel which works correctly, then next time I open another internal frame 'B' the system crashes.
    can anyone knows the cause of the problem
    thanks in advance

    Here is the exception:
    java.lang.ArrayIndexOutOfBoundsException: 2 >= 2
         at java.util.Vector.elementAt(Unknown Source)
         at javax.swing.plaf.basic.BasicTabbedPaneUI.getTextViewForTab(Unknown Source)
         at javax.swing.plaf.basic.BasicTabbedPaneUI.calculateTabHeight(Unknown Source)
         at javax.swing.plaf.basic.BasicTabbedPaneUI.calculateMaxTabHeight(Unknown Source)
         at javax.swing.plaf.basic.BasicTabbedPaneUI$TabbedPaneLayout.calculateTabRects(Unknown Source)
         at javax.swing.plaf.basic.BasicTabbedPaneUI$TabbedPaneLayout.calculateLayoutInfo(Unknown Source)
         at javax.swing.plaf.basic.BasicTabbedPaneUI$TabbedPaneLayout.layoutContainer(Unknown Source)
         at java.awt.Container.layout(Unknown Source)
         at java.awt.Container.doLayout(Unknown Source)
         at java.awt.Container.validateTree(Unknown Source)
         at java.awt.Container.validateTree(Unknown Source)
         at java.awt.Container.validateTree(Unknown Source)
         at java.awt.Container.validateTree(Unknown Source)
         at java.awt.Container.validateTree(Unknown Source)
         at java.awt.Container.validate(Unknown Source)
         at javax.swing.RepaintManager.validateInvalidComponents(Unknown Source)
         at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
         at java.awt.event.InvocationEvent.dispatch(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)

  • Mac OS LookAndFeel problem

    Dear friends,
    I'm using j2sdk1.4.2_08.When I import com.sun.java.swing.plaf.mac.* ; and compile the program it display error sayin that >>>>
    C:\MyJava\RepeatGridColor.java:4: package com.sun.java.swing.plaf.mac does not exist
    import com.sun.java.swing.plaf.mac.*;
    ^
    1 error
    Process completed.
    Actually what is the problem in here. Thanks in advance.
    Regards
    plan_ever

    ARUZ_SDC
    Welcome to the forum. Please don't post in old threads that are long dead. Do you really think people are waiting all these years for your answer?
    I'm locking this thread now. It's 3½ years old.
    db

  • Problem with Form and webutil loading jar and connection

    Can anyone shed light on this. Here is my java console output. I then get FRM-90250 and FRM-92101....
    Orion-web.xml
    <virtual-directory virtual-path="/webutil"
    real-path="C:\webutil/lib" />
    Forms90.conf
    #Virtual path for WebUtil
    AliasMatch ^/forms90/webutil/(..*) "c:\webutil/lib/$1"
    formsweb.cfg
    webUtilArchive=/forms90/webutil/webutil.jar,/forms90/webutil/jacob.jar
    [WEBFTU]
    pageTitle=Creative Automation Services
    form=c:\export\data\ca\prod\webftu.fmx
    archive_jini=f90all_jinit.jar,rolloverbutton.jar,hyperlink.jar
    archive_ie=f90all.cab
    archive=f90all.jar
    webUtilArchive=/forms90/webutil/webutil.jar,/forms90/webutil/jacob.jar
    WebUtilLogging=off
    #WebUtilLogging=Console
    # WebUtilLoggingDetail=normal
    WebUtilLoggingDetail=Detailed
    WebUtilErrorMode=Alert
    baseHTMLjinitiator=C:\webutil\server\webutiljini.htm
    width=900
    height=600
    splashScreen=/forms90/images/splash.gif
    background=/forms90/images/black.gif
    logo=/forms90/images/blackborder.gif
    lookAndFeel=Oracle
    colorScheme=Titanium
    otherparams=useSDI=yes
    workingDirectory=c:\export\data\ca\prod
    envFile=C:\webutil\server\webutil.env
    Oracle JInitiator: Version 1.3.1.9
    Using JRE version 1.3.1.9 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\msantry
    User has overriden browser's proxy settings.
    Proxy Configuration: no proxy
    JAR cache enabled
    Location: C:\javaburps\CACHE
    Maximum size: 50 MB
    Compression level: 0
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    q: hide console
    s: dump system properties
    t: dump thread list
    x: clear classloader cache
    0-5: set trace level to <n>
    Loading http://clientapps.cauto.com/forms90/webutil/webutil.jar from JAR cache
    Downloading http://clientapps.cauto.com/forms90/webutil/jacob.jar to JAR cache
    Loading http://clientapps.cauto.com/forms90/java/f90all_jinit.jar from JAR cache
    RegisterWebUtil - Loading Webutil Version 1.0.2 Beta
    Loading http://clientapps.cauto.com/forms90/java/rolloverbutton.jar from JAR cache
    Loading http://clientapps.cauto.com/forms90/java/hyperlink.jar from JAR cache
    connectMode=HTTP, native.
    oracle.forms.net.ConnectionException: Forms session <3> failed during startup: no response from runtime process
         at oracle.forms.net.ConnectionException.createConnectionException(Unknown Source)
         at oracle.forms.net.HTTPNStream.getResponse(Unknown Source)
         at oracle.forms.net.HTTPNStream.doFlush(Unknown Source)
         at oracle.forms.net.HTTPNStream.flush(Unknown Source)
         at java.io.DataOutputStream.flush(Unknown Source)
         at oracle.forms.net.HTTPConnection.connect(Unknown Source)
         at oracle.forms.engine.FormsDispatcher.initConnection(Unknown Source)
         at oracle.forms.engine.FormsDispatcher.init(Unknown Source)
         at oracle.forms.engine.Runform.initConnection(Unknown Source)
         at oracle.forms.engine.Runform.startRunform(Unknown Source)
         at oracle.forms.engine.Main.createRunform(Unknown Source)
         at oracle.forms.engine.Main.start(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Thanks,
    Mary Santry

    The error does not look like a webutil client side problem - it looks more like a server side issue - perhaps the runtime not being able to find the webutil.pll.
    Check your FORMS90_PATH in the webutil.env file and make sure it's not too long (>255 chars) if it is split it and use ORACLE_PATH as well.

  • Problem With ButtonUI in an Auxiliary Look and Feel

    This is my first post to one of these forums, so I hope everything works correctly.
    I have been trying to get an axiliary look and feel installed to do some minor tweaking to the default UI. In particular, I need it to work with Windows and/or Metal as the default UI. For the most part I let the installed default look and feel handle things with my code making some colors lighter, darker, etc. I also play with focus issues by adding FocusListeners to some components. I expect my code to work reasonably well no matter what the default look and feel is. It works well with Motif, Metal, and Windows, the only default look and feels I've tested with. What I'm going to post is a stripped down version of what I have been working on. This example makes gross changes to the JButton background and foreground colors in order to illustrate what I've encountered.
    I have three source code files. The first, Problem.java, creates a JFrame and adds five buttons to it. One button installs MyAuxLookAndFeel as an auxiliary look and feel using MyAuxButtonUI for the look and feel of JButtons. The next button removes that look and feel. The next button does nothing except print a line to System.out. The next button installs MyAuxLookAndFeel as an auxiliary look and feel using MyModButtonUI for the look and feel of JButtons. The last button removes that look and feel.
    The problem is, when I install the first auxiliary look and feel, buttons are no longer tabable. Also, they cannot be invoked by pressing the space button when they're in focus. When I remove the first auxiliary look and feel everything reverts to behaving normally. When I add the "Mod" version, button tabability is fine. The only difference is I've added the following code:
    if ( c.isFocusable() ) {
       c.setFocusable(true);
    }That strikes me as an odd piece of code to profoundly change the program behavior. Anyway, after adding and removing the "Mod" look and feel, the tababilty is forever fixed. That is, if I subsequently re-install the first look and feel, tababilty works just fine.
    The problem with using the space bar to select a focused button is more problematic. My class is not supposed to mess with the default look and feel which may or may not use the space bar to press the button with focus. When the commented code in MyModButtonUI is uncommented, things behave correctly. Even the statement
    button.getInputMap().remove( spaceKeyStroke );doesn't mess things up after the auxiliary look and feel is removed. So far I've tested this with JRE 1.4.2_06 under Windows 2000, JRE 1.4.2_10 under Windows XP, and JRE 1.5.0_06 under Windows XP and the behavior is the same.
    All of this leads me to two questions.
    1. Is my approach fundamentally flawed? I've extended TextUI and ScrollBarUI with no problems. This is the only problem I've encountered with ButtonUI. My real workaround for the space bar issue is better than the one I've supplied in the example, but it certainly is not guaranteed to work for any arbitrary default look and feel.
    2. Assuming I have no fundamental problems with my approach, it's possible I've found a real bug. I searched the bug database and couldn't find anything like this. Of course, this is the first time I've tried seasrching the database for a bug so my I'm doing it badly. Has this already been reported as a bug? Is there any reason I shouldn't report it?
    What follows is the source code for my example. It's in three files because the two ButtonUI classes must be public in order to work. Thanks for insight you can provide.
    Bill
    File Problem.java:
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Problem extends JFrame {
       public boolean isAuxInstalled = false;
       public boolean isModInstalled = false;
       public LookAndFeel lookAndFeel = new MyAuxLookAndFeel();
       private static int ctr = 0;
       public static void main( String[] args ) {
          new Problem();
       public Problem() {
          this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          setSize(250, 150);
          setTitle("Button Test");
          JButton install = new JButton("Install");
          JButton remove = new JButton("Remove");
          JButton doNothing = new JButton("Do Nothing");
          JButton installMod = new JButton("Install Mod");
          JButton removeMod = new JButton("Remove Mod");
          this.getContentPane().setLayout(new FlowLayout());
          this.getContentPane().add(install);
          this.getContentPane().add(remove);
          this.getContentPane().add(doNothing);
          this.getContentPane().add(installMod);
          this.getContentPane().add(removeMod);
          install.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent e) {
                if ( !isAuxInstalled ) {
                   isAuxInstalled = true;
                   UIManager.addAuxiliaryLookAndFeel( lookAndFeel );
                   SwingUtilities.updateComponentTreeUI( Problem.this );
          remove.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent e) {
                if ( isAuxInstalled ) {
                   isAuxInstalled = false;
                   UIManager.removeAuxiliaryLookAndFeel( lookAndFeel );
                   SwingUtilities.updateComponentTreeUI( Problem.this );
          doNothing.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent e) {
                System.out.println( "Do nothing " + (++ctr) );
          installMod.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent e) {
                if ( !isModInstalled ) {
                   isModInstalled = true;
                   UIManager.addAuxiliaryLookAndFeel( lookAndFeel );
                   SwingUtilities.updateComponentTreeUI( Problem.this );
          removeMod.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent e) {
                if ( isModInstalled ) {
                   isModInstalled = false;
                   UIManager.removeAuxiliaryLookAndFeel( lookAndFeel );
                   SwingUtilities.updateComponentTreeUI( Problem.this );
          setVisible(true);
       class MyAuxLookAndFeel extends LookAndFeel {
          public String getName() {
             return "Button Test";
          public String getID() {
             return "Not well known";
          public String getDescription() {
             return "Button Test Look and Feel";
          public boolean isSupportedLookAndFeel() {
             return true;
          public boolean isNativeLookAndFeel() {
             return false;
          public UIDefaults getDefaults() {
             UIDefaults table = new MyDefaults();
             Object[] uiDefaults = {
                "ButtonUI", (isModInstalled ? "MyModButtonUI" : "MyAuxButtonUI"),
             table.putDefaults(uiDefaults);
             return table;
       class MyDefaults extends UIDefaults {
          protected void getUIError(String msg) {
    //         System.err.println("(Not) An annoying error message!");
    }File MyAuxButtonUI.java:
    import javax.swing.*;
    import java.awt.*;
    import javax.swing.plaf.*;
    import javax.swing.plaf.multi.*;
    import javax.accessibility.*;
    public class MyAuxButtonUI extends ButtonUI {
       private Color background;
       private Color foreground;
       private ButtonUI ui = null;
       public static ComponentUI createUI( JComponent c ) {
          return new MyAuxButtonUI();
       public void installUI(JComponent c) {
          MultiButtonUI multiButtonUI = (MultiButtonUI) UIManager.getUI(c);
          this.ui = (ButtonUI) (multiButtonUI.getUIs()[0]);
          super.installUI( c );
          background = c.getBackground();
          foreground = c.getForeground();
          c.setBackground(Color.GREEN);
          c.setForeground(Color.RED);
       public void uninstallUI(JComponent c) {
          super.uninstallUI( c );
          c.setBackground(background);
          c.setForeground(foreground);
          this.ui = null;
       public void paint(Graphics g, JComponent c) {
          this.ui.paint( g, c );
       public void update(Graphics g, JComponent c) {
          this.ui.update( g, c );
       public Dimension getPreferredSize(JComponent c) {
          if ( this.ui == null ) {
             return super.getPreferredSize( c );
          return this.ui.getPreferredSize( c );
       public Dimension getMinimumSize(JComponent c) {
          if ( this.ui == null ) {
             return super.getMinimumSize( c );
          return this.ui.getMinimumSize( c );
       public Dimension getMaximumSize(JComponent c) {
          if ( this.ui == null ) {
             return super.getMaximumSize( c );
          return this.ui.getMaximumSize( c );
       public boolean contains(JComponent c, int x, int y) {
          if ( this.ui == null ) {
             return super.contains( c, x, y );
          return this.ui.contains( c, x, y );
       public int getAccessibleChildrenCount(JComponent c) {
          if ( this.ui == null ) {
             return super.getAccessibleChildrenCount( c );
          return this.ui.getAccessibleChildrenCount( c );
       public Accessible getAccessibleChild(JComponent c, int ii) {
          if ( this.ui == null ) {
             return super.getAccessibleChild( c, ii );
          return this.ui.getAccessibleChild( c, ii );
    }File MyModButtonUI.java:
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.plaf.*;
    public class MyModButtonUI extends MyAuxButtonUI
       static KeyStroke spaceKeyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0 );
       public static ComponentUI createUI( JComponent c ) {
          return new MyModButtonUI();
       public void installUI(JComponent c) {
          super.installUI(c);
          c.setBackground(Color.CYAN);
          if ( c.isFocusable() ) {
             c.setFocusable(true);
    //      final JButton button = (JButton) c;
    //      button.getInputMap().put( spaceKeyStroke, "buttonexample.pressed" );
    //      button.getActionMap().put( "buttonexample.pressed", new AbstractAction() {
    //         public void actionPerformed(ActionEvent e) {
    //            button.doClick();
    //   public void uninstallUI(JComponent c) {
    //      super.uninstallUI(c);
    //      JButton button = (JButton) c;
    //      button.getInputMap().remove( spaceKeyStroke );
    //      button.getActionMap().remove( "buttonexample.pressed" );
    }

    here is the code used to change the current look and feel :
    try {
                   UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");
             catch (InstantiationException e)
                  System.out.println("Error occured  "+ e.toString());
             catch (ClassNotFoundException e)
                  System.out.println("Error occured  "+ e.toString());
             catch (UnsupportedLookAndFeelException e)
                  System.out.println("Error occured  "+ e.toString());
             catch (IllegalAccessException e)
                  System.out.println("Error occured in .. " + e.toString());
             Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
             Fenetre fen = new Fenetre();
             fen.setSize(dim.width, dim.height);
             fen.setResizable(false);
                 fen.setLocation(0, 0);
                  fen.setVisible(true);

  • Problems downloading java in firefox

    My new forms install 11.1.1.4 will not work in firefox 3.6.16 . It wants to download jre 6.12:
    http://java.sun.com/products/archive/j2se/6u12/index.html
    However the download is immediately cancelled. If I tell it to resume it, it looks like it was downloaded but it is not there.
    This is a problem I've had in recent times downloading anything from oracle and not just java There's something wrong with firefox vs oracle's web site. Sometimes you can use firefox sometimes you can't.
    Anyway I got 6u24 installed but the test form does not recognize it because it is not 6.12. So this has got to be an faq how to
    change the dependence on 6u12 to 6u24 (or better whatever the current version of java would be). I'm sorry to ask such a dumb
    newbie question but if anyone knows how to change it I'd really appreciate it.
    this does not work with firefox with 6u24, that's all I know. (the test form does work with chrome and with IE 8. BTW I found that if
    you have this problem downloading any java with firefox, it is easier to download it with chrome. I see that chrome is very cognizant of
    jre versions and there's a lot of confirming things on sun's website. So you can download and install java via chrome if the other avenues
    are not working. (I'm getting a real java headache now. I think I'll work on something else :-)
    <HTML>
    <!-- FILE: basejpi.htm (Oracle Forms)                                 -->
    <!--                                                                  --> 
    <!-- This is the default base HTML file for running a form on the     -->
    <!-- web using the JDK Java Plugin. This is used for example when     -->
    <!-- running with Netscape on Unix.                                   -->
    <!--                                                                  --> 
    <!-- IMPORTANT NOTES:                                                 -->
    <!-- Default values for all the variables which appear below          -->
    <!-- (enclosed in percent characters) are defined in the servlet      -->
    <!-- configuration file (formsweb.cfg). It is preferable to make      -->
    <!-- changes in that file where possible, rather than this one.       -->
    <!--                                                                  --> 
    <!-- This file will be REPLACED if you reinstall Oracle Forms, so     -->
    <!-- you are advised to create your own version if you want to make   -->
    <!-- any modifications.  You should then set the baseHTMLjpi          -->
    <!-- parameter in the Forms Servlet configuration file (formsweb.cfg) -->
    <!-- to point to your new file instead of this one.                   -->
    <HEAD><TITLE>Oracle Fusion Middleware Forms Services</TITLE></HEAD>
    <BODY >
    <COMMENT id="forms_plugin_info"
             serverURL="/forms/lservlet?ifcfs=/forms/frmservlet?form=test.fmx&ifsessid=formsapp.19&acceptLanguage=en-us,en;q=0.5"
             plug_ver="clsid:CAFEEFAC-0016-0000-0012-ABCDEFFEDCBA"
             appheight="600"
             appwidth="750"
             appcodebase="http://java.sun.com/update/1.6.0/jinstall-6-windows-i586.cab#Version=1,6,0,12"
             appname="">
    </COMMENT>
    <!-- Forms applet definition (start) -->
    <NOSCRIPT>
    <OBJECT classid="clsid:CAFEEFAC-0016-0000-0012-ABCDEFFEDCBA"
            codebase="http://java.sun.com/update/1.6.0/jinstall-6-windows-i586.cab#Version=1,6,0,12"
            WIDTH="750"
            HEIGHT="600"
            HSPACE="0"
            VSPACE="0"
            ID="">
    </NOSCRIPT>
    <SCRIPT LANGUAGE="JavaScript" SRC="/forms/frmjscript/forms_ie.js"></SCRIPT>
    <PARAM NAME="TYPE"       VALUE="application/x-java-applet;jpi-version=1.6.0_12">
    <PARAM NAME="CODEBASE"   VALUE="/forms/java">
    <PARAM NAME="CODE"       VALUE="oracle.forms.engine.Main" >
    <PARAM NAME="ARCHIVE"    VALUE="frmall.jar" >
    <PARAM NAME="serverURL" VALUE="/forms/lservlet?ifcfs=/forms/frmservlet?form=test.fmx&ifsessid=formsapp.19&acceptLanguage=en-us,en;q=0.5">
    <PARAM NAME="networkRetries" VALUE="0">
    <PARAM NAME="serverArgs"
           VALUE="escapeParams=true module=test.fmx userid=  debug=no host= port= obr=no record= tracegroup= log= term= ssoProxyConnect=no">
    <PARAM NAME="separateFrame" VALUE="false">
    <PARAM NAME="splashScreen"  VALUE="">
    <PARAM NAME="background"  VALUE="">
    <PARAM NAME="lookAndFeel"  VALUE="Oracle">
    <PARAM NAME="colorScheme"  VALUE="teal">
    <PARAM NAME="serverApp" VALUE="default">
    <PARAM NAME="logo" VALUE="">
    <PARAM NAME="imageBase" VALUE="codebase">
    <PARAM NAME="formsMessageListener" VALUE="">
    <PARAM NAME="recordFileName" VALUE="">
    <PARAM NAME="EndUserMonitoringEnabled" VALUE="false">
    <PARAM NAME="EndUserMonitoringURL" VALUE="">
    <PARAM NAME="heartBeat" VALUE="">
    <PARAM NAME="MaxEventWait" VALUE="">
    <PARAM NAME="allowAlertClipboard" VALUE="true">
    <PARAM NAME="disableValidateClipboard" VALUE="false">
    <PARAM NAME="enableJavascriptEvent" VALUE="true">
    <PARAM NAME="MAYSCRIPT" VALUE="true">
    <PARAM NAME="digitSubstitution" VALUE="context">
    <PARAM NAME="legacy_lifecycle" VALUE="false">
    <PARAM NAME="JavaScriptBlocksHeartBeat" VALUE="false">
    <PARAM NAME="highContrast" VALUE="false">
    <PARAM NAME="disableMDIScrollbars" VALUE="">
    <PARAM NAME="clientDPI" VALUE="">
    <PARAM name="applet_stop_timeout" value="800">
    <COMMENT>
    <EMBED SRC="" PLUGINSPAGE="http://java.sun.com/products/archive/j2se/6u12/index.html"
            TYPE="application/x-java-applet;jpi-version=1.6.0_12"
            java_codebase="/forms/java"
            java_code="oracle.forms.engine.Main"
            java_archive="frmall.jar"
            WIDTH="750"
            HEIGHT="600"
            HSPACE="0"
            VSPACE="0"
            NAME=""
            serverURL="/forms/lservlet?ifcfs=/forms/frmservlet?form=test.fmx&ifsessid=formsapp.19&acceptLanguage=en-us,en;q=0.5"
            networkRetries="0"
            serverArgs="escapeParams=true module=test.fmx userid=  debug=no host= port= obr=no record= tracegroup= log= term= ssoProxyConnect=no"
            separateFrame="false"
            splashScreen=""
            background=""
            lookAndFeel="Oracle"
            colorScheme="teal"
            serverApp="default"
            logo=""
            imageBase="codebase"
            recordFileName=""
            EndUserMonitoringEnabled="false"
            EndUserMonitoringURL=""
            heartBeat=""
            MaxEventWait=""
            disableValidateClipboard="false"
            allowAlertClipboard="true"
            enableJavascriptEvent="true"
            MAYSCRIPT="true"
            digitSubstitution="context"
            legacy_lifecycle="false"
            JavaScriptBlocksHeartBeat="false"
            highContrast="false"
            disableMDIScrollbars=""
            clientDPI=""
            applet_stop_timeout="800"
    >
    <NOEMBED>
    </COMMENT>
    </NOEMBED></EMBED>
    </OBJECT>
    <!-- Forms applet definition (end) -->
    </BODY>
    </HTML>Edited by: lake on Apr 18, 2011 1:10 PM

    Oh a simple fix. You merely have to find the formsweb.cfg file which in 11.1.1.4 is something like:
    c:\Oracle\Middleware\user_projects\domains\forms\config\fmwconfig\servers\WLS_FORMS\applications\formsapp_11.1.1\config\formsweb.cfg
    change these 3 items to as follows:
    jpi_classid=clsid:CAFEEFAC-0016-0000-0024-ABCDEFFEDCBA
    jpi_codebase=/forms/java/jre-6u24-windows-i586.exe#Version=1,6,0,24
    jpi_mimetype=application/x-java-applet;jpi-version=1.6.0_24
    you could also change the download so they are not downloading the wrong thing:
    jpi_download_page=https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=jre-6u24-oth-JPR@CDS-CDS_Developer
    I probably missed a few.
    (But does this mean that every time there is another version of java I'm going to have to change this file? Actually I though mozilla was
    going to run the latest version of java if you specified one that was earlier. There's just no telling what that program is going to do.

  • LookAndFeel issue reloading an Applet in a Web page

    Hey all,
    I have an Applet that runs on a web page (loaded by servlets and JSP's using Tomcat 3.2.1 and Apache). I created my own LookAndFeel class and have a static function in the applet that sets the LookAndFeel to my new class. Everything works fine when the Applet is first loaded. However, when you exit the applet and then reload it, the custom LookAndFeel is gone and all I get is the default Metal. If I load the applet with appletviewer, I can reload it as much as I want and it always loads my LookAndFeel class.
    The static function is as follows
    /** Static initializer to set the LookAndFeel
    static {
    try {
    UIManager.setLookAndFeel(new MyNewLookAndFeel());
    catch (Exception e) {}
    I do not get any exceptions and like I said, everything works great when loaded with appletviewer.
    I have tried adding the SwingUtilities.updateComponentTreeUI(this); in either the start(), init(), or my own createGUI() function and it still does not work.
    Any ideas? Could this be a problem with the browser caching the applet? I am using IE 5.50.

    I have the same problem
    putting them in static doesn't keep the look and feel
    putting them in the applet constructor does'nt keep it
    putting them in init() doesn't keep it
    putting them in start() doesn't keep it
    heck, even putting them in all 4 of them together doesn't keep the look and feel, it always reverts back to metal

  • JTree custom renderer setting selection background color problem

    Hi,
    I have a JTree with a custom icon renderer that displays an icon. The JTree is part of a TreeTable component. Iam having a problem setting the selection background uniformly for the entire row. There is no problem when there is no row selected in the JTable.
    My present code looks like this:
    Iam overriding paint in my renderer which extends DefaultCellRenderer.
           super.paint(g);
            Color bColor = null;
            if(!m_selected) {
                 if(currRow % 2 == 0) {
                      bColor = Color.WHITE;
                 } else {
                                                    bColor = backColor;
            } else {
                 bColor = table.getSelectionBackground();                  bColor = getRowSelectionColor();
         if(bColor != null) {
                           g.setColor(bColor);
             if(!m_selected) {
                   g.setXORMode(new Color(0xFF, 0xFF, 0xFF));
             } else {
                 g.setXORMode(new Color(0x00, 0x00, 0x00));
                  I have a color I arrive at using some algorithm that I want using method getRowSelectionColor(). The other cells in the row have this color. But the cell containing the tree node shows different color. Iam not able to arrive at the right combination of the color to set and the xor color so my tree node also looks like the other cells in the row.
    It is not a problem really as the table still looks good. Its just that the tree node looks like it has been highlighted and this might cause a problem when a table cell is highlighed later on in the application ( two cells in the row would be highlighted causing confusion).
    Any help would be appreciated.
    Regards,
    vidyut

    Hi Camickr,
    Thanks for the reply. Iam sorry I didn't include the sources the first time around. There were too many of them. I have created a small, self-contained, compilable program that demonstrates the problem and including it herewith. Still there's quite many files but they are all needed Iam afraid. The only one you will have to concern yourself fior this problem is the file IconRenderer.java. The treenode background and the other cells background are not in sync when table row is not selected in this example though. But they are in my real program. I just need them to be in sync i.e have the same background color when the row is selected.
    Your help would be very much appreciated.
    These are the files that are included below:
    1. AbstractTreeTableModel.java
    2. Bookmarks.java
    3. BookmarksModel.java
    4. DynamicTreeTableModel.java
    5. IconRenderer.java
    6. IndicatorRenderer.java
    7. JTreeTable.java
    8. TreeTableExample3.java (contains main)
    9. TreeTableModel.java
    10. TreeTableModelAdapter.java
    The copyright and javadocs information has been stripped for clarity.
    cheers,
    vidyut
    // AbstractTreeTableModel.java BEGIN
    import javax.swing.tree.*;
    import javax.swing.event.*;
    public abstract class AbstractTreeTableModel implements TreeTableModel {
        protected Object root;    
        protected EventListenerList listenerList = new EventListenerList();
        public AbstractTreeTableModel(Object root) {
            this.root = root;
        // Default implementations for methods in the TreeModel interface.
        public Object getRoot() {
            return root;
        public boolean isLeaf(Object node) {
            return getChildCount(node) == 0;
        public void valueForPathChanged(TreePath path, Object newValue) {}
        // This is not called in the JTree's default mode:
        // use a naive implementation.
        public int getIndexOfChild(Object parent, Object child) {
            for (int i = 0; i < getChildCount(parent); i++) {
             if (getChild(parent, i).equals(child)) {
                 return i;
         return -1;
        public void addTreeModelListener(TreeModelListener l) {
            listenerList.add(TreeModelListener.class, l);
        public void removeTreeModelListener(TreeModelListener l) {
            listenerList.remove(TreeModelListener.class, l);
        protected void fireTreeNodesChanged(Object source, Object[] path,
                                            int[] childIndices,
                                            Object[] children) {
            // Guaranteed to return a non-null array
            Object[] listeners = listenerList.getListenerList();
            TreeModelEvent e = null;
            // Process the listeners last to first, notifying
            // those that are interested in this event
            for (int i = listeners.length-2; i>=0; i-=2) {
                if (listeners==TreeModelListener.class) {
    // Lazily create the event:
    if (e == null)
    e = new TreeModelEvent(source, path,
    childIndices, children);
    ((TreeModelListener)listeners[i+1]).treeNodesChanged(e);
    protected void fireTreeNodesInserted(Object source, Object[] path,
    int[] childIndices,
    Object[] children) {
    // Guaranteed to return a non-null array
    Object[] listeners = listenerList.getListenerList();
    TreeModelEvent e = null;
    // Process the listeners last to first, notifying
    // those that are interested in this event
    for (int i = listeners.length-2; i>=0; i-=2) {
    if (listeners[i]==TreeModelListener.class) {
    // Lazily create the event:
    if (e == null)
    e = new TreeModelEvent(source, path,
    childIndices, children);
    ((TreeModelListener)listeners[i+1]).treeNodesInserted(e);
    protected void fireTreeNodesRemoved(Object source, Object[] path,
    int[] childIndices,
    Object[] children) {
    // Guaranteed to return a non-null array
    Object[] listeners = listenerList.getListenerList();
    TreeModelEvent e = null;
    // Process the listeners last to first, notifying
    // those that are interested in this event
    for (int i = listeners.length-2; i>=0; i-=2) {
    if (listeners[i]==TreeModelListener.class) {
    // Lazily create the event:
    if (e == null)
    e = new TreeModelEvent(source, path,
    childIndices, children);
    ((TreeModelListener)listeners[i+1]).treeNodesRemoved(e);
    protected void fireTreeStructureChanged(Object source, Object[] path,
    int[] childIndices,
    Object[] children) {
    // Guaranteed to return a non-null array
    Object[] listeners = listenerList.getListenerList();
    TreeModelEvent e = null;
    // Process the listeners last to first, notifying
    // those that are interested in this event
    for (int i = listeners.length-2; i>=0; i-=2) {
    if (listeners[i]==TreeModelListener.class) {
    // Lazily create the event:
    if (e == null)
    e = new TreeModelEvent(source, path,
    childIndices, children);
    ((TreeModelListener)listeners[i+1]).treeStructureChanged(e);
    // Default impelmentations for methods in the TreeTableModel interface.
    public Class getColumnClass(int column) { return Object.class; }
    public boolean isCellEditable(Object node, int column) {
    return getColumnClass(column) == TreeTableModel.class;
    public void setValueAt(Object aValue, Object node, int column) {}
    // Left to be implemented in the subclass:
    * public Object getChild(Object parent, int index)
    * public int getChildCount(Object parent)
    * public int getColumnCount()
    * public String getColumnName(Object node, int column)
    * public Object getValueAt(Object node, int column)
    // AbstractTreeTableModel.java END
    // Bookmarks.java BEGIN
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import javax.swing.text.*;
    import javax.swing.text.html.*;
    import javax.swing.text.html.parser.*;
    public class Bookmarks {
    /** The root node the bookmarks are added to. */
    private BookmarkDirectory root;
    * Creates a new Bookmarks object, with the entries coming from
    * <code>path</code>.
    public Bookmarks(String path) {
         root = new BookmarkDirectory("Bookmarks");
         if (path != null) {
         parse(path);
    * Returns the root of the bookmarks.
    public BookmarkDirectory getRoot() {
         return root;
    protected void parse(String path) {
         try {
         BufferedReader reader = new BufferedReader(new FileReader
                                       (path));
         new ParserDelegator().parse(reader, new CallbackHandler(), true);
         catch (IOException ioe) {
         System.out.println("IOE: " + ioe);
         JOptionPane.showMessageDialog(null, "Load Bookmarks",
                             "Unable to load bookmarks",
                             JOptionPane.ERROR_MESSAGE);
    private static final short NO_ENTRY = 0;
    private static final short BOOKMARK_ENTRY = 2;
    private static final short DIRECTORY_ENTRY = 3;
    private class CallbackHandler extends HTMLEditorKit.ParserCallback {
         /** Parent node that new entries are added to. */
         private BookmarkDirectory parent;
         /** The most recently parsed tag. */
         private HTML.Tag tag;
         /** The last tag encountered. */
         private HTML.Tag lastTag;
         * The state, will be one of NO_ENTRY, DIRECTORY_ENTRY,
    * or BOOKMARK_ENTRY.
         private short state;
         * Date for the next BookmarkDirectory node.
         private Date parentDate;
         * The values from the attributes are placed in here. When the
         * text is encountered this is added to the node hierarchy and a
    * new instance is created.
         private BookmarkEntry lastBookmark;
         * Creates the CallbackHandler.
         public CallbackHandler() {
         parent = root;
         lastBookmark = new BookmarkEntry();
         // HTMLEditorKit.ParserCallback methods
         * Invoked when text in the html document is encountered. Based on
         * the current state, this will either: do nothing
    * (state == NO_ENTRY),
         * create a new BookmarkEntry (state == BOOKMARK_ENTRY) or
    * create a new
         * BookmarkDirectory (state == DIRECTORY_ENTRY). If state is
    * != NO_ENTRY, it is reset to NO_ENTRY after this is
    * invoked.
    public void handleText(char[] data, int pos) {
         switch (state) {
         case NO_ENTRY:
              break;
         case BOOKMARK_ENTRY:
              // URL.
              lastBookmark.setName(new String(data));
    parent.add(lastBookmark);
    lastBookmark = new BookmarkEntry();
              break;
         case DIRECTORY_ENTRY:
              // directory.
              BookmarkDirectory newParent = new
                   BookmarkDirectory(new String(data));
              newParent.setCreated(parentDate);
              parent.add(newParent);
              parent = newParent;
              break;
         default:
              break;
    state = NO_ENTRY;
         * Invoked when a start tag is encountered. Based on the tag
         * this may update the BookmarkEntry and state, or update the
         * parentDate.
         public void handleStartTag(HTML.Tag t, MutableAttributeSet a,
                        int pos) {
         lastTag = tag;
         tag = t;
         if (t == HTML.Tag.A && lastTag == HTML.Tag.DT) {
    long lDate;
              // URL
              URL url;
              try {
              url = new URL((String)a.getAttribute(HTML.Attribute.HREF));
              } catch (MalformedURLException murle) {
              url = null;
              lastBookmark.setLocation(url);
              // created
              Date date;
              try {
    lDate = Long.parseLong((String)a.getAttribute("add_date"));
    if (lDate != 0l) {
    date = new Date(1000l * lDate);
    else {
    date = null;
              } catch (Exception ex) {
              date = null;
              lastBookmark.setCreated(date);
              // last visited
              try {
    lDate = Long.parseLong((String)a.
    getAttribute("last_visit"));
    if (lDate != 0l) {
    date = new Date(1000l * lDate);
    else {
    date = null;
              } catch (Exception ex) {
              date = null;
              lastBookmark.setLastVisited(date);
              state = BOOKMARK_ENTRY;
         else if (t == HTML.Tag.H3 && lastTag == HTML.Tag.DT) {
              // new node.
              try {
              parentDate = new Date(1000l * Long.parseLong((String)a.
                                  getAttribute("add_date")));
              } catch (Exception ex) {
              parentDate = null;
              state = DIRECTORY_ENTRY;
         * Invoked when the end of a tag is encountered. If the tag is
         * a DL, this will set the node that parents are added to the current
         * nodes parent.
         public void handleEndTag(HTML.Tag t, int pos) {
         if (t == HTML.Tag.DL && parent != null) {
              parent = (BookmarkDirectory)parent.getParent();
    public static class BookmarkDirectory extends DefaultMutableTreeNode {
         /** Dates created. */
         private Date created;
         public BookmarkDirectory(String name) {
         super(name);
         public void setName(String name) {
         setUserObject(name);
         public String getName() {
         return (String)getUserObject();
         public void setCreated(Date date) {
         this.created = date;
         public Date getCreated() {
         return created;
    public static class BookmarkEntry extends DefaultMutableTreeNode {
         /** User description of the string. */
         private String name;
         /** The URL the bookmark represents. */
         private URL location;
         /** Dates the URL was last visited. */
         private Date lastVisited;
         /** Date the URL was created. */
         private Date created;
         public void setName(String name) {
         this.name = name;
         public String getName() {
         return name;
         public void setLocation(URL location) {
         this.location = location;
         public URL getLocation() {
         return location;
         public void setLastVisited(Date date) {
         lastVisited = date;
         public Date getLastVisited() {
         return lastVisited;
         public void setCreated(Date date) {
         this.created = date;
         public Date getCreated() {
         return created;
         public String toString() {
         return getName();
    // Bookmarks.java END
    // BookmarksModel.java BEGIN
    import java.util.Date;
    public class BookmarksModel extends DynamicTreeTableModel {
    * Names of the columns.
    private static final String[] columnNames =
    { "Name", "Location", "Last Visited", "Created" };
    * Method names used to access the data to display.
    private static final String[] methodNames =
    { "getName", "getLocation", "getLastVisited","getCreated" };
    * Method names used to set the data.
    private static final String[] setterMethodNames =
    { "setName", "setLocation", "setLastVisited","setCreated" };
    private static final Class[] classes =
    { TreeTableModel.class, String.class, Date.class, Date.class };
    public BookmarksModel(Bookmarks.BookmarkDirectory root) {
         super(root, columnNames, methodNames, setterMethodNames, classes);
    public boolean isCellEditable(Object node, int column) {
         switch (column) {
         case 0:
         // Allow editing of the name, as long as not the root.
         return (node != getRoot());
         case 1:
         // Allow editing of the location, as long as not a
         // directory
         return (node instanceof Bookmarks.BookmarkEntry);
         default:
         // Don't allow editing of the date fields.
         return false;
    // BookmarksModel.java END
    // DynamicTreeTableModel.java BEGIN
    import java.lang.reflect.*;
    import javax.swing.tree.*;
    public class DynamicTreeTableModel extends AbstractTreeTableModel {
    /** Names of the columns, used for the TableModel getColumnName method. */
    private String[] columnNames;
    private String[] methodNames;
    private String[] setterMethodNames;
    /** Column classes, used for the TableModel method getColumnClass. */
    private Class[] cTypes;
    public DynamicTreeTableModel(TreeNode root, String[] columnNames,
                        String[] getterMethodNames,
                        String[] setterMethodNames,
                        Class[] cTypes) {
         super(root);
         this.columnNames = columnNames;
         this.methodNames = getterMethodNames;
         this.setterMethodNames = setterMethodNames;
         this.cTypes = cTypes;
    public int getChildCount(Object node) {
         return ((TreeNode)node).getChildCount();
    public Object getChild(Object node, int i) {
         return ((TreeNode)node).getChildAt(i);
    public boolean isLeaf(Object node) {
         return ((TreeNode)node).isLeaf();
    public int getColumnCount() {
         return columnNames.length;
    public String getColumnName(int column) {
         if (cTypes == null || column < 0 || column >= cTypes.length) {
         return null;
         return columnNames[column];
    public Class getColumnClass(int column) {
         if (cTypes == null || column < 0 || column >= cTypes.length) {
         return null;
         return cTypes[column];
    public Object getValueAt(Object node, int column) {
         try {
         Method method = node.getClass().getMethod(methodNames[column],
                                  null);
         if (method != null) {
              return method.invoke(node, null);
         catch (Throwable th) {}
         return null;
    * Returns true if there is a setter method name for column
    * <code>column</code>. This is set in the constructor.
    public boolean isCellEditable(Object node, int column) {
    return (setterMethodNames != null &&
         setterMethodNames[column] != null);
    // Note: This looks up the methods each time! This is rather inefficient;
    // it should really be changed to cache matching
    // methods/constructors
    // based on <code>node</code>'s class, and code>aValue</code>'s
    //class.
    public void setValueAt(Object aValue, Object node, int column) {
         boolean found = false;
         try {
         // We have to search through all the methods since the
         // types may not match up.
         Method[] methods = node.getClass().getMethods();
         for (int counter = methods.length - 1; counter >= 0; counter--) {
              if (methods[counter].getName().equals
              (setterMethodNames[column]) && methods[counter].
              getParameterTypes() != null && methods[counter].
              getParameterTypes().length == 1) {
              // We found a matching method
              Class param = methods[counter].getParameterTypes()[0];
              if (!param.isInstance(aValue)) {
                   // Yes, we can use the value passed in directly,
                   // no coercision is necessary!
                   if (aValue instanceof String &&
                   ((String)aValue).length() == 0) {
                   // Assume an empty string is null, this is
                   // probably bogus for here.
                   aValue = null;
                   else {
                   // Have to attempt some sort of coercision.
                   // See if the expected parameter type has
                   // a constructor that takes a String.
                   Constructor cs = param.getConstructor
                   (new Class[] { String.class });
                   if (cs != null) {
                        aValue = cs.newInstance(new Object[]
                                       { aValue });
                   else {
                        aValue = null;
              // null either means it was an empty string, or there
              // was no translation. Could potentially deal with these
              // differently.
              methods[counter].invoke(node, new Object[] { aValue });
              found = true;
              break;
         } catch (Throwable th) {
         System.out.println("exception: " + th);
         if (found) {
         // The value changed, fire an event to notify listeners.
         TreeNode parent = ((TreeNode)node).getParent();
         fireTreeNodesChanged(this, getPathToRoot(parent),
                        new int[] { getIndexOfChild(parent, node) },
                        new Object[] { node });
    public TreeNode[] getPathToRoot(TreeNode aNode) {
    return getPathToRoot(aNode, 0);
    private TreeNode[] getPathToRoot(TreeNode aNode, int depth) {
    TreeNode[] retNodes;
         // This method recurses, traversing towards the root in order
         // size the array. On the way back, it fills in the nodes,
         // starting from the root and working back to the original node.
    /* Check for null, in case someone passed in a null node, or
    they passed in an element that isn't rooted at root. */
    if(aNode == null) {
    if(depth == 0)
    return null;
    else
    retNodes = new TreeNode[depth];
    else {
    depth++;
    if(aNode == root)
    retNodes = new TreeNode[depth];
    else
    retNodes = getPathToRoot(aNode.getParent(), depth);
    retNodes[retNodes.length - depth] = aNode;
    return retNodes;
    // DynamicTreeTableModel.java END
    // IconRenderer.java BEGIN
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import javax.swing.plaf.basic.BasicTreeUI;
    class IconRenderer extends DefaultTreeCellRenderer
    // Color backColor = new Color(0xD0, 0xCC, 0xFF);
    Color backColor = new Color(0xF0, 0xF0, 0xE0);
    String tipText = "";
    JTree tree;
    int currRow = 0;
    boolean m_selected;
    JTable table;
    public IconRenderer(JTree tree, JTable table) {
    this.table = table;
    // setBackground(backColor);
    setBackground(Color.GREEN);
    setForeground(Color.black);
         this.tree = tree;
    public Component getTreeCellRendererComponent(JTree tree, Object value,
    boolean selected,
    boolean expanded, boolean leaf,
    int row, boolean hasFocus) {
         Object node = null;
         super.getTreeCellRendererComponent(
    tree, value, selected,
    expanded, leaf, row,
    hasFocus);
         TreePath treePath = tree.getPathForRow(row);
    if(treePath != null)
              node = treePath.getLastPathComponent();
    currRow = row;
    m_selected = selected;
    DefaultMutableTreeNode itc = null;
    if (node instanceof DefaultMutableTreeNode) {
    itc = (DefaultMutableTreeNode)node;
         setClosedIcon(closedIcon);
    setOpenIcon(openIcon);
    return this;
    /* Override the default to send back different strings for folders and leaves. */
    public String getToolTipText() {
    return tipText;
    * Paints the value. The background is filled based on selected.
    public void paint(Graphics g) {
         super.paint(g);
         Color bColor = null;
         if(!m_selected) {
              System.out.println(" iconren not sel currRow " + currRow);
              if(currRow % 2 == 0) {
                   bColor = Color.WHITE;
              } else {
              bColor = backColor;
         } else {
              bColor = table.getSelectionBackground();
              System.out.println("in else selbg = " + bColor);           
              bColor = new Color(0xF0, 0xCC, 0x92);
              System.out.println(" bColor aft = " + bColor);           
         int imageOffset = -1;
         if(bColor != null) {
         imageOffset = getLabelStart();
         g.setColor(bColor);
         if(!m_selected) {
              System.out.println(" not sel setting white ");
              g.setXORMode(new Color(0xFF, 0xFF, 0xFF));
         } else {
    //          g.setXORMode(new Color(0xCC, 0xCC, 0x9F));
              g.setXORMode(new Color(0x00, 0x00, 0x00));
              System.out.println(" using color = " + g.getColor());           
         if(getComponentOrientation().isLeftToRight()) {
         g.fillRect(imageOffset, 0, getWidth() - 1 - imageOffset,
                   getHeight());
         } else {
         g.fillRect(0, 0, getWidth() - 1 - imageOffset,
                   getHeight());
    private int getLabelStart() {
         Icon currentI = getIcon();
         if(currentI != null && getText() != null) {
         return currentI.getIconWidth() + Math.max(0, getIconTextGap() - 1);
         return 0;
    // IconRenderer.java END
    // IndicatorRenderer.java BEGIN
    // import java.awt.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.event.*;
    import javax.swing.tree.*;
    import javax.swing.table.*;
    import javax.swing.table.*;
    import javax.swing.plaf.basic.*;
    import java.awt.event.*;
    import java.util.EventObject;
    import java.text.NumberFormat;
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.StringTokenizer;
    import java.util.Arrays;
    class IndicatorRenderer extends DefaultTableCellRenderer {
    /** Makes sure the number of displayed in an internationalized
    * manner. */
    protected NumberFormat formatter;
    /** Row that is currently being painted. */
    protected int lastRow;
    protected int reloadRow;
    protected int reloadCounter;
    protected TreeTableModel treeTableModel;
    protected TreeTableModelAdapter treeTblAdapter;
    protected JTable table;
    Component renderer = null;
    Color backColor = new Color(0xF0, 0xF0, 0xE0);
    IndicatorRenderer(TreeTableModelAdapter treeTblAdapter, TreeTableModel treeTableModel) {
         setHorizontalAlignment(JLabel.RIGHT);
         setFont(new Font("serif", Font.BOLD, 12));
         this.treeTableModel = treeTableModel;
         this.treeTblAdapter = treeTblAdapter;
    * Invoked as part of DefaultTableCellRenderers implemention. Sets
    * the text of the label.
    public void setValue(Object value) {
    /* setText((value == null) ? "---" : formatter.format(value)); */
         setText((value == null) ? "---" : (String) value.toString());
    * Returns this.
    public Component getTableCellRendererComponent(JTable table,
    Object value, boolean isSelected, boolean hasFocus,
    int row, int column) {
         renderer = super.getTableCellRendererComponent(table, value, isSelected,
    hasFocus, row, column);
         lastRow = row;
         this.table = table;
              if(isSelected) {
                   doMask(hasFocus, isSelected);
              } else
              setBackground(table.getBackground());
    return renderer;
    * If the row being painted is also being reloaded this will draw
    * a little indicator.
    public void paint(Graphics g) {
         super.paint(g);
    private void doMask(boolean hasFocus, boolean selected) {
              maskBackground(hasFocus, selected);
    private void maskBackground(boolean hasFocus, boolean selected) {
              Color seed = null;
              seed = table.getSelectionBackground();
              Color color = seed;
              if (color != null) {
                   setBackground(
    new Color(0xF0, 0xCC, 0x92));
    // IndicatorRenderer.java END
    // JTreeTable.java BEGIN
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.event.*;
    import javax.swing.tree.*;
    import javax.swing.table.*;
    import java.awt.event.*;
    import java.util.EventObject;
    public class JTreeTable extends JTable {
    /** A subclass of JTree. */
    protected TreeTableCellRenderer tree;
    protected IndicatorRenderer indicatorRenderer = null;
    public JTreeTable(TreeTableModel treeTableModel) {
         super();
         // Creates the tree. It will be used as a renderer and editor.
         tree = new TreeTableCellRenderer(treeTableModel);
         TreeTableModelAdapter tdap = new TreeTableModelAdapter(treeTableModel, tree);
         // Installs a tableModel representing the visible rows in the tree.
         super.setModel(tdap);
         // Forces the JTable and JTree to share their row selection models.
         ListToTreeSelectionModelWrapper selectionWrapper = new
         ListToTreeSelectionModelWrapper();
         tree.setSelectionModel(selectionWrapper);
         setSelectionModel(selectionWrapper.getListSelectionModel());
         // Installs the tree editor renderer and editor.
         setDefaultRenderer(TreeTableModel.class, tree);
         setDefaultEditor(TreeTableModel.class, new TreeTableCellEditor());
         indicatorRenderer = new IndicatorRenderer(tdap, treeTableModel);     
         // No grid.
         setShowGrid(false);
         // No intercell spacing
         setIntercellSpacing(new Dimension(0, 0));     
         // And update the height of the trees row to match that of
         // the table.
         //if (tree.getRowHeight() < 1) {
         // Metal looks better like this.
         setRowHeight(20);
    public TableCellRenderer getCellRenderer(int row, int col) {
              if(col == 0)
              return tree;
              else
              return indicatorRenderer;     
    public void updateUI() {
         super.updateUI();
         if(tree != null) {
         tree.updateUI();
         // Do this so that the editor is referencing the current renderer
         // from the tree. The renderer can potentially change each time
         // laf changes.
         setDefaultEditor(TreeTableModel.class, new TreeTableCellEditor());
         // Use the tree's default foreground and background colors in the
         // table.
    LookAndFeel.installColorsAndFont(this, "Tree.background",
    "Tree.foreground", "Tree.font");
    public int getEditingRow() {
    return (getColumnClass(editingColumn) == TreeTableModel.class) ? -1 :
         editingRow;
    private int realEditingRow() {
         return editingRow;
    public void sizeColumnsToFit(int resizingColumn) {
         super.sizeColumnsToFit(resizingColumn);
         if (getEditingColumn() != -1 && getColumnClass(editingColumn) ==
         TreeTableModel.class) {
         Rectangle cellRect = getCellRect(realEditingRow(),
                             getEditingColumn(), false);
    Component component = getEditorComponent();
         component.setBounds(cellRect);
    component.validate();
    public void setRowHeight(int rowHeight) {
    super.setRowHeight(rowHeight);
         if (tree != null && tree.getRowHeight() != rowHeight) {
    tree.setRowHeight(getRowHeight());
    public JTree getTree() {
         return tree;
    public boolean editCellAt(int row, int column, EventObject e){
         boolean retValue = super.editCellAt(row, column, e);
         if (retValue && getColumnClass(column) == TreeTableModel.class) {
         repaint(getCellRect(row, column, false));
         return retValue;
    public class TreeTableCellRenderer extends JTree implements
         TableCellRenderer {
         /** Last table/tree row asked to renderer. */
         protected int visibleRow;
         /** Border to draw around the tree, if this is non-null, it will
         * be painted. */
         protected Border highlightBorder;
         public TreeTableCellRenderer(Tr

  • Problem Webutil WEBUTIL_FILE.FILE_SELECTION_DIALOG_INT will not work

    Hi,
    i am using WebUtil with Oracle Developer 10g(9.0.4)
    i have got the problem
    oracle.forms.webutil.file.FileFunctions bean not found
    WEBUTIL_FILE.FILE_SELECTION_DIALOG_INT will not work.
    all configuration is very good ( formsweb.cfg, wenutill.pll...)
    but i have got this problem
    I am create a new form in C:\webutil_106 and webutil.olb and
    webutil.pll in the same direction C:\webutil_106.
    in FORMS_PATH IN REGISTARY
    Code: [Select all] [Show/ hide]
    ( C:\webutil_106 )
    in default.env
    Code: [Select all] [Show/ hide]
    ( FORMS90_PATH=C:\Dev10g_old\forms90;C:\Dev10g_old\forms90\webutil; C:\webutil_106
    WEBUTIL_CONFIG=C:\Dev10g_old\forms90\server\webutil.cfg
    CLASSPATH= C:\Dev10g_old\forms90\java\jacob.jar;
    C:\Dev10g_old\forms90\java\frmwebutil.jar;
    C:\Dev10g_old\forms90\java\f90all.jar;
    C:\Dev10g_old\jdk\jre\lib\rt.jar
    in formsweb.cfg
    Code: [Select all] [Show/ hide]
    ( archive_jini=f90all_jinit.jar;frmwebutil.jar;jacob.jar
    archive=f90all.jar
    and end of files
    [webutil]
    WebUtilLogging=off
    WebUtilLoggingDetail=normal
    WebUtilErrorMode=Alert
    WebUtilDispatchMonitorInterval=5
    WebUtilTrustInternal=true
    WebUtilMaxTransferSize=16384
    baseHTMLjinitiator=webutiljini.htm
    baseHTMLjpi=webutiljpi.htm
    baseHTML=webutilbase.htm
    archive_jini=f90all_jinit.jar
    WebUtilArchive=frmwebutil.jar,jacob.jar,f90all.jar
    archive=frmwebutil.jar,f90all.jar
    lookAndFeel=oracle
    in webutil.cfg
    Code: [Select all] [Show/ hide]
    transfer.database.enabled=TRUE
    transfer.appsrv.enabled=TRUE
    and I am using The URL:
    Code: [Select all] [Show/ hide]
    http://<LOCALHOST>:8889/forms90/f90servlet?CONFIG=WEBUTIL
    I am creating the webutil user and grant dba and execute
    the create_webutil_db.sql successfully

    Hi,
    i am using WebUtil with Oracle Developer 10g(9.0.4)
    i have got the problem
    oracle.forms.webutil.file.FileFunctions bean not found
    WEBUTIL_FILE.FILE_SELECTION_DIALOG_INT will not work.
    all configuration is very good ( formsweb.cfg, wenutill.pll...)
    but i have got this problem
    I am create a new form in C:\webutil_106 and webutil.olb and
    webutil.pll in the same direction C:\webutil_106.
    in FORMS_PATH IN REGISTARY
    Code: [Select all] [Show/ hide]
    ( C:\webutil_106 )
    in default.env
    Code: [Select all] [Show/ hide]
    ( FORMS90_PATH=C:\Dev10g_old\forms90;C:\Dev10g_old\forms90\webutil; C:\webutil_106
    WEBUTIL_CONFIG=C:\Dev10g_old\forms90\server\webutil.cfg
    CLASSPATH= C:\Dev10g_old\forms90\java\jacob.jar;
    C:\Dev10g_old\forms90\java\frmwebutil.jar;
    C:\Dev10g_old\forms90\java\f90all.jar;
    C:\Dev10g_old\jdk\jre\lib\rt.jar
    in formsweb.cfg
    Code: [Select all] [Show/ hide]
    ( archive_jini=f90all_jinit.jar;frmwebutil.jar;jacob.jar
    archive=f90all.jar
    and end of files
    [webutil]
    WebUtilLogging=off
    WebUtilLoggingDetail=normal
    WebUtilErrorMode=Alert
    WebUtilDispatchMonitorInterval=5
    WebUtilTrustInternal=true
    WebUtilMaxTransferSize=16384
    baseHTMLjinitiator=webutiljini.htm
    baseHTMLjpi=webutiljpi.htm
    baseHTML=webutilbase.htm
    archive_jini=f90all_jinit.jar
    WebUtilArchive=frmwebutil.jar,jacob.jar,f90all.jar
    archive=frmwebutil.jar,f90all.jar
    lookAndFeel=oracle
    in webutil.cfg
    Code: [Select all] [Show/ hide]
    transfer.database.enabled=TRUE
    transfer.appsrv.enabled=TRUE
    and I am using The URL:
    Code: [Select all] [Show/ hide]
    http://<LOCALHOST>:8889/forms90/f90servlet?CONFIG=WEBUTIL
    I am creating the webutil user and grant dba and execute
    the create_webutil_db.sql successfully

Maybe you are looking for

  • How to delete duplicate records in 10 G.

    how to delete duplicate records in 10 G.

  • Mini Bridge will not load in PSC5

    When I'm in photoshop cs5, and click on mini-bridge, it says it can't load.  Same with any other extenions I have. I've uninstalled the program.  Used MAC keeper, which is supposed to remove everything.  But I reinstall CS5, said it was installed, ev

  • Re: Recognizing JAR files in WEB-INF/lib

    Steven Vetzal wrote: I am attempting to open existing web projects in NitroX and am beingplagued with: The class "com.someone.Class" is not in the application class path The classes are contained in JAR files in WEB-INF/lib. I have been looking for a

  • I have a 5800xm with this problem

    HI all .. i have this problem with my 5800xm that i cant update it from nokia updater or from the phone .. my  product code is 0549361 .. ana when i ask i get this answer   Sorry, there is no software currently available for that product code via the

  • Lost my page options in Leopard

    I have an HP deskjet 960c. Since I installed Leopard I've no page options. It prints but I can't open and preview Adobe docs nor any other Word doc. I've reinstalled the printer files but no joy. Any idea?