Help with displaying a JTree

Hi,
I have developed a webspider that cycles through a website detecting all urls and checking for borken links. I currently have build a JTree that takes the current url that is being processed and creates a string and adds it to a JTree. The problem I have is that the urls are printed in the JTree as one long list, e.g.
|Test
|____url 1
|____url 1a
|____url 2
|____url 2a
I would like it to disply like this:
|Test
|____url 1
|-------|____url 1a
|____url 2
|-------|____url 2a
(I have had to place the dashes in so it displays properly)
So that the strucutre of the website can be seen. I have read the JTree tutroial and my code looks like this, sorry its large i'm not too sure which bits to cut out:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.tree.*;
import javax.swing.event.*;
import java.net.*;
import java.io.*;
import java.util.*;
public class gui extends JFrame implements Runnable
      *declare variable, boolean
      *thread, a object and a center
      *pane
     protected URL urlInput;
     protected Thread bgThread;
     protected boolean run = false;
     protected WebSpider webSpider;
     public String brokenUrl;
     public String goodUrl;
     public String deadUrl;
     protected DefaultMutableTreeNode rootNode;
    protected DefaultTreeModel treeModel;
     public gui()
            *create the gui here
           setTitle("Testing Tool");
         setSize(600,600);
         //add Buttons to the tool bar
         start.setText("Start");
         start.setActionCommand("Start");
         toolBar.add(start);
         ButtonListener startListener = new ButtonListener();
             start.addActionListener(startListener);
          cancel.setText("Cancel");
         cancel.setActionCommand("Cancel");
         toolBar.add(cancel);
         ButtonListener cancelListener = new ButtonListener();
             cancel.addActionListener(cancelListener);
             clear.setText("Clear");
         clear.setActionCommand("Clear");
         toolBar.add(clear);
         ButtonListener clearListener = new ButtonListener();
             clear.addActionListener(clearListener);
             close.setText("Close");
         close.setActionCommand("Close");
         toolBar.add(close);
         ButtonListener closeListener = new ButtonListener();
             close.addActionListener(closeListener);
             //creat a simple form
             urlLabel.setText("Enter URL:");
             urlLabel.setBounds(100,36,288,24);
             formTab.add(urlLabel);
             url.setBounds(170,36,288,24);
             formTab.add(url);
             current.setText("Currently Processing: ");
             current.setBounds(100,80,288,24);
             formTab.add(current);
         //add the scrol pane and text area to the error tab
         errorTab.add(errorPane);
         errorPane.setBounds(0,0,580,490);
         errorPane.getViewport().add(errorText);
         //add the scroll pane to the tree tab
         treeTab.add(treePane);
         treePane.setBounds(0,0,580,490);
         //create the JTree
         rootNode = new DefaultMutableTreeNode("Test");
         treeModel = new DefaultTreeModel(rootNode);
         treeModel.addTreeModelListener(new MyTreeModelListener());
         tree = new JTree(treeModel);
         tree.setEditable(true);
         tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
        tree.setShowsRootHandles(true);
         treePane.getViewport().add(tree);
         //create the tabbed window             
        centerPane.setBorder(new javax.swing.border.EtchedBorder());
        formTab.setLayout(null);
        errorTab.setLayout(null);
        treeTab.setLayout(null);
        centerPane.addTab("Search Parameters", formTab);
        centerPane.addTab("Error Messages", errorTab);
        centerPane.addTab("Website Structure", treeTab);
          //add the tool bar and tabbed pane
          getContentPane().add(toolBar, java.awt.BorderLayout.NORTH);
        getContentPane().add(centerPane, java.awt.BorderLayout.CENTER);             
             *create the tool bar pane, a center pane, add the buttons,
             *labels, tabs, a text field for user input here
            javax.swing.JPanel toolBar = new javax.swing.JPanel();
            javax.swing.JButton start = new javax.swing.JButton();
          javax.swing.JButton cancel = new javax.swing.JButton();
          javax.swing.JButton clear = new javax.swing.JButton();
          javax.swing.JButton close = new javax.swing.JButton();      
            javax.swing.JTabbedPane centerPane = new javax.swing.JTabbedPane();
            javax.swing.JPanel formTab = new javax.swing.JPanel();
            javax.swing.JLabel urlLabel = new javax.swing.JLabel();
            javax.swing.JLabel current = new javax.swing.JLabel();
            javax.swing.JTextField url = new javax.swing.JTextField();
            javax.swing.JPanel errorTab = new javax.swing.JPanel();
            javax.swing.JTextArea errorText = new javax.swing.JTextArea();
            javax.swing.JScrollPane errorPane = new javax.swing.JScrollPane();
            javax.swing.JPanel treeTab = new javax.swing.JPanel();
            javax.swing.JScrollPane treePane = new javax.swing.JScrollPane();
            javax.swing.JTree tree = new javax.swing.JTree();
           *show the gui
          public static void main(String args[])
              (new gui()).setVisible(true);
          *listen for the button presses and set the
          *boolean flag depending on which button is pressed
         class ButtonListener implements ActionListener
              public void actionPerformed(ActionEvent event)
                   Object object = event.getSource();
                   if (object == start)
                        run = true;
                        startActionPerformed(event);
                   if (object == cancel)
                        run = false;
                        startActionPerformed(event);
                   if (object == clear)
                        errorText.setText("");
                        rootNode.removeAllChildren();
                       treeModel.reload();
                   if (object == close)
                        System.exit(0);
          *this method is called when the start or
          *cancel button is pressed.
         void startActionPerformed (ActionEvent event)
              if (run == true && bgThread == null)
                   bgThread = new Thread(this);
                   bgThread.start();
              if (run == false && bgThread != null)
                   webSpider.cancel();
          *this mehtod will start the background thred.
          *the background thread is required so that the
          *GUI is still displayed
         public void run()
              try
                       webSpider = new WebSpider(this);
                     webSpider.clear();
                     urlInput = new URL(url.getText());
                   webSpider.addURL(urlInput);
                   webSpider.run();
                   bgThread = null;
                  catch (MalformedURLException e)
                       addressError addErr = new addressError();
                     addErr.addMsg = "URL ERROR - PLEASE CHECK";
                     SwingUtilities.invokeLater(addErr);
             *this method is called by the web spider
             *once a url is found. Validation of navigation
             *happens here.
            public boolean urlFound(URL urlInput,URL url)
                  CurrentlyProcessing pro = new CurrentlyProcessing();
              pro.msg = url.toString();
              SwingUtilities.invokeLater(pro);
              if (!testLink(url))
                    navigationError navErr = new navigationError();
                    navErr.navMsg = "Broken Link "+url+" caused on "+urlInput+"\n";
                    brokenUrl = url.toString();
                    return false;
              if (!url.getHost().equalsIgnoreCase(urlInput.getHost()))
                    return false;
              else
                     return true;
            //this method is returned if there is no link on a web page
            public void urlNotFound(URL urlInput)
                      deadEnd dEnd = new deadEnd();
                       dEnd.dEMsg = "No links on "+urlInput+"\n";
                       deadUrl = urlInput.toString();                
            //this method is called internally to check that a link works              
            protected boolean testLink(URL url)
               try
                     URLConnection connection = url.openConnection();
                     connection.connect();
                     goodUrl = url.toString();
                     return true;
              catch (IOException e)
                     return false;
            //this method is called when an error is found            
            public void urlError(URL url)
          //this method is called when an email address is found             
            public void emailFound(String email)
          //this method will update any navigation errors found
          class addressError implements Runnable
               public String addMsg;
               public void run()
                    current.setText("Currently Processing: "+ addMsg);
                    errorText.append(addMsg);
          class navigationError implements Runnable
               public String navMsg;
               public void run()
                    errorText.append(navMsg);
          class deadEnd implements Runnable
               public String dEMsg;
               public void run()
                    errorText.append(dEMsg);
          //this method will update the currently processing field on the GUI
          public class CurrentlyProcessing implements Runnable
               public String msg;
              //public String msgInfo = msg;
                 public void run()
                     current.setText("Currently Processing: " + msg );
                     addObject(msg);
         //add a node to the tree
            public DefaultMutableTreeNode addObject (Object child)
             DefaultMutableTreeNode parentNode = null;
             return addObject(parentNode, child, true);
         public DefaultMutableTreeNode addObject(DefaultMutableTreeNode parent,Object child,boolean shouldBeVisible)
             DefaultMutableTreeNode childNode = new DefaultMutableTreeNode(child);
             if (parent == null)
                 parent = rootNode;
             treeModel.insertNodeInto(childNode, parent, parent.getChildCount());
             if (shouldBeVisible)
                 tree.scrollPathToVisible(new TreePath(childNode.getPath()));
                  return childNode;
         //listener for the tree model     
         public class MyTreeModelListener implements TreeModelListener
              public void treeNodesChanged (TreeModelEvent e)
                   DefaultMutableTreeNode node;
                   node = (DefaultMutableTreeNode)
                   (e.getTreePath().getLastPathComponent());
                   try
                        int index = e.getChildIndices()[0];
                        node = (DefaultMutableTreeNode)
                        (node.getChildAt(index));
                   catch (NullPointerException exc)
              public void treeNodesInserted(TreeModelEvent e)
              public void treeStructureChanged(TreeModelEvent e)
              public void treeNodesRemoved(TreeModelEvent e)
}It uses a class called webspider which i have not attached, if required please let me know. I beleive that in addObject I am adding all nodes to the root as children.
Any help would be much appreciated.
Many Thanks
MRv

I would recomend you create your own JTree class for this.
Here are a few things I set in my constructor within the JTree:
// turn on tooltips
ToolTipManager.sharedInstance().registerComponent(this);
// used by two setters so create reference
RollupTreeCellRenderer renderer = new RollupTreeCellRenderer();
// customizing the icons for the tree
// setting the folder icons
renderer.setOpenIcon(IconLoader.getIcon("Open.gif"));
renderer.setClosedIcon(IconLoader.getIcon("Folder.gif"));
// inventory icon
renderer.setLeafIcon(IconLoader.getIcon("Document.gif"));
// add renderer to highlight Inventory nodes with Red or Blue text
setCellRenderer(renderer);
Here is the renderer class example:
class RollupTreeCellRenderer
extends DefaultTreeCellRenderer
* Configures the renderer based on the passed in components.
* The value is set from messaging the tree with
* <code>convertValueToText</code>, which ultimately invokes
* <code>toString</code> on <code>value</code>.
* The foreground color is set based on the selection and the icon
* is set based on on leaf and expanded.
* @param tree JTree
* @param value Object
* @param sel boolean
* @param expanded boolean
* @param leaf boolean
* @param row int
* @param hasFocus boolean
* @return Component
public Component getTreeCellRendererComponent(JTree tree, Object value,
boolean sel,
boolean expanded,
boolean leaf, int row,
boolean hasFocus)
// call super for default behavior
super.getTreeCellRendererComponent(tree,
value,
sel,
expanded,
leaf,
row,
hasFocus);
// if the current node is selected do NOT over-ride
// the default colors
if (sel)
return this;
// cast to our wrapper Node class
RollupNode node = (RollupNode) value;
if (node.isInventory())
if (RollupMediator.getInstance().nodeInList(node))
setForeground(RollupTree.FOUND);
setToolTipText("Click to find positions count");
else
setForeground(RollupTree.NOT_FOUND);
setToolTipText("Inventory not in current business date");
else
setToolTipText("Double click to edit name");
return this;
} // Renderer
Let me know if you need more examples.
BTW
I the TreeCellRenderer example is not public so I can add it to the bottom of the file that contains my custom JTree.

Similar Messages

  • Help with display quality (LCD TV)

    I've hooked up my Mac mini to my Samsung 32" LCD TV via HDMI cable.
    The overall quality is just far from desireable and is taking away all of the fun from using this new mac.
    I set the resolution output to 720p, which is what the TV supports. So that's good.
    I played slightly with the Contrast and Brightness on the TV settings.
    But I must be missing something. Although the image is sharp, it's very difficult to read from 6ft away, pictures look terrible (seeing the same picture on a different computer and monitor is so much more revealing), and the display is bad for everything basically.
    Please help with any settings suggestions or perhaps a detailed guideline for my setup.
    I started to configure a color profile on the display settings but the results weren't that great and I reverted to default. Too many subtle changes. My colorblindness probably doesn't help.
    Thanks.

    Thanks for the response.
    It's the latest Mac Mini with 2.5ghz i5, AMD Radeon HD 6630M, and 8GB RAM.
    I am familiar with the "Just Scan" setting under picture size on the Samsung TV.
    I'll look for the digital noise reduction.
    Are there complete guides with recommended settings for different setups? Or maybe even general, that would help me here?
    Thanks.

  • Help with display settings needed urgently

    Graphics and icons that are supposed to be round appear oval. For instance the Safari and App icons on the dock appear very oval. Logos on websites I've visited before and I know are round appear oval.
    I've tried all display settings and nothing helps. I'm a designer and this is causing a major hinderance. Everything appears condenced / squashed sideways. I'd be very grateful if someone could help with this.
    I've just purchased the laptop. I have been using Mac for a few years and I've always selected the "stretched" option from the Display settings which sorted out the problem completely. A circle looked a proper circle. But in this version the option is not available.
    Badly hoping someone can help with this.
    Thanks.
    Version Details - OS X Lion 10.7.4

    It sounds like you have selected an incorrect resolution.  For starters, are you talking about your Air's display or an external display?  You haven't said which Air you have.  If you have an 11" model, make sure your display resolution is set to 1366x768.  If you have a 13" model, it should be set to 1440x900.  These are the proper resolutions for the built in displays.  Chosing anything other than the referenced "native" display resolutions will result in distortions or clarity problems. 

  • Help with display of numbers

    First of all I have to say the tutorials on this site are extremely helpful. My instructor wants all our java code written as Object Oriented and when I did a search on here for Object Oriented it totally helped out. Now I just need help with the display of numbers, my code works perfectly fine except that the number has wayyyyyyyyyyy to many decimal points after it. I only wanted two.
    public class Mortgage
         double mtgAmount;
         double mtgTerm;
         double mtgRate;
         double monthPymt;
              public void Amount(double newValue)
                     mtgAmount = newValue;
              public double Amount()
                   return mtgAmount;
              public void Term(double newValue)
                     mtgTerm = newValue;
              public double Term()
                   return mtgTerm;
              public void Rate(double newValue)
                     mtgRate = newValue;
              public double Rate()
                   return mtgRate;
              public void calcmonthPymt(double newValue)                            //(LoanAmt * Rate) / (1- Math.pow(1+Rate,-Term));
                     monthPymt = (newValue);
              public void display()
              System.out.println ("The Mortgage Amount is:" +(Amount( ) * Rate( )) / (1- Math.pow(1+Rate( ),-Term( ))));
         public static void main (String[] args)
                     Mortgage Mortgage1=new Mortgage();
                     Mortgage1.Amount(200000);
                     Mortgage1.Term(360);
                     Mortgage1.Rate(.0575);
                     Mortgage1.display();
    }

    I figured it out, the math is wrong I think but I got everything to display correctly
    import java.io.*;
    import java.text.*;
    import java.text.DecimalFormat;
    public class Mortgage
         double mtgAmount;
         double mtgTerm;
         double mtgRate;
         double monthPymt;
         DecimalFormat money = new DecimalFormat("$0.00");
              public void Amount(double newValue)
                     mtgAmount = newValue;
              public double Amount()
                   return mtgAmount;
              public void Term(double newValue)
                     mtgTerm = newValue;
              public double Term()
                   return mtgTerm;
              public void Rate(double newValue)
                     mtgRate = newValue;
              public double Rate()
                   return mtgRate;
              public void calcmonthPymt(double newValue)                            //(LoanAmt * Rate) / (1- Math.pow(1+Rate,-Term));
                     monthPymt = (newValue);
              public void display()
              monthPymt = (Amount( ) * Rate( )) / (1- Math.pow(1+Rate( ),-Term( )));
              System.out.printf("The payment amount is:$%.2f", monthPymt);
              System.out.println();
         public static void main (String[] args)
                     Mortgage Mortgage1=new Mortgage();
                     Mortgage1.Amount(200000);
                     Mortgage1.Term(360);
                     Mortgage1.Rate(.0575);
                     Mortgage1.display();
    }

  • Help with displaying image received from socket on Canvas

    Dear programmers
    I know that I'm pestering you lot for a lot of help but I just got one tiny problem which I just can't get over.
    I'm developing a remote desktop application which uses an applet as it's client and I need help in displaying the image.
    When a connection is made to the server, it continuously takes screenshots, converts them to jpg and then send them to the client applet via socket communication. I've got the the server doing this in a for(;;) loop and I've tested the communication and all seems to be working fine. However the applet is causing some issues such as displaying "loading applet" until I stop the server and then the 1st screenshot is displayed. Is there a way to modify the following code so that it displays the current image onto a canvas while the next image is being downloaded and then replace the original image with the one which has just been downloaded. All this needs to be done with as little flicker as possible.
    for(;;)
        filename = dis.readUTF();
        fileSize = dis.readInt();
        fileInBuffer = new byte[fileSize];
        dis.readFully(fileInBuffer, 0, fileSize-1);
        //Create an image from the byte array
        img = Toolkit.getDefaultToolkit().createImage(fileInBuffer);
        //Create a MyCanvas object and add the canvas to the applet
        canvas = new IRDPCanvas(img, this);
        canvas.addMouseListener(this);
        canvas.addKeyListener(this);
        add(canvas);
    }

    Anyone?

  • Help with display glith using JList

    Hi, first post so bit of background - I'm teaching Java at the moment, am fine with command line but am dabbling more with Swing, despite certain glitches I always get ( e.g. the 7-segment display last year) but anyway....
    I've been trying to develop a little app that picks random boxers for a computer game. My current problem is that i am trying to add custom boxers and then update the JList and repaint the frame. When I add a boxer i can see it adding to the list, however it is unreadable and displayed too small.
    Forgive any bad coding etiquettes - its very much a work in progress from a relatively poor programmer ;)
    theBoxers is a JPanel containing the JLists, aWindow is the JFrame, customButton is a button to add a custom fighter - this gets a name from a field, and a weight from a combo box, adds it to an array and then attempts to add it to an array, then re-generate the lists
    customButton.addActionListener(new ActionListener()
                public void actionPerformed(ActionEvent e)
                        addCustom(customCombo.getSelectedIndex(),addCustomName.getText());
                             System.out.println(customCombo.getSelectedIndex() + addCustomName.getText());
                             theBoxers.repaint();
                             aWindow.repaint();
    public void addCustom(int theWeight, String theName)
              switch(theWeight)
                   case 0:          featherCustoms[featherCustomsSize]=theName;
                                  featherFighters = new JList(featherCustoms);
                                  featherCustomsSize++;
                                  break;
                   case 1:          lightCustoms[lightCustomsSize]=theName;
                                  lightFighters = new JList(lightCustoms);
                                  lightCustomsSize++;
                                  break;
                   case 2:          welterCustoms[welterCustomsSize]=theName;
                                  welterFighters = new JList(welterCustoms);
                                  welterCustomsSize++;
                                  break;
                   case 3:          middleCustoms[middleCustomsSize]=theName;
                                  middleFighters = new JList(middleCustoms);
                                  middleCustomsSize++;
                                  break;
                   case 4:          lightHeavyCustoms[lightHeavyCustomsSize]=theName;
                                  lightHeavyFighters = new JList(lightHeavyCustoms);
                                  lightHeavyCustomsSize++;
                                  break;
                   case 5:          heavyCustoms[featherCustomsSize]=theName;
                                  heavyFighters = new JList(heavyCustoms);
                                  heavyCustomsSize++;
                                  break;
                   default:     System.out.println("Not Added");
                                  break;
         }

    Awww, its nice that DB has someone to comeback and carry on a discussion.....long after its over.
    The problem here seems to be your lack of understanding between what a teacher or what an 'instructor' is.
    From the way you speak, an instructor appears to be someone who is technically skilled in both coding and teaching Java as a programming language, designed for people who wish to code in Java.
    A Teacher is someone who must deliver a wide range of subject knowledge to a wide range of abilities, including those who were unable to pass High-School exams. They are responsible for pitching the subject at the correct level for the student, whilst also teaching towards passing the exam, and ultimately gaining a qualification.
    The computing course i am currently teaching does not require OOP, but as Java is the language i was taught at University, and is still often used in our University's, I chose it. I don't pretend to be the best programmer in the world. But I do know that I am teaching the pupils the correct basics, at a higher level than is probably required, to give them the right approach at university. also, this is whilst teaching a large amount of theory.
    Whether you agree, or disagree, matters not to me as I think you would be unfamilier with the specification I am currently teaching to, or what area's of study need to be taught. The exam board appears happy, as do past students who are now well into their university course, as did my marker when i achieved my degree.
    The code posted in the OP (as stated earlier) had nothing to do with displaying my coding abilities, nor did it display the technique's I use when teaching students. It was a small sample of a program which included a JList which was not displaying properly. I tried to include the whole code but it was too big, therefore it was cut down.
    It was a work in progress which i now have working. So now i can look at it again in terms of programming structure. It appears I have made a mistake asking for assistance on here, as instead I got a lecture, with very little insight on your part as to my situation or the nature of the problem/solution.
    At the end of the day, each to his/her own opinion. What I will say is that when someone requests help, positive feedback/criticism is well recieved along with instructions/guidance on how the problem can be solved. I feel that I received none of this on here, but this is what I will always provide to the students I teach.
    Not everyone is a full-time Java programmer or has the time to hit the highest expectations.

  • Help with building a JTree using tree node and node renderers

    Hi,
    I am having a few problems with JTree's. basically I want to build JTree from a web spider. The webspide searches a website checking links and stores the current url that is being processed as a string in the variable msg. I wan to use this variable to build a JTree in a new class and then add it to my GUI. I have created a tree node class and a renderer node class, these classes are built fine. can someone point me in the direction for actually using these to build my tree in a seperate class and then displaying it in a GUI class?
    *nodeRenderer.java
    import javax.swing.*;
    import javax.swing.tree.*;
    import java.awt.*;
    import java.net.*;
    public class nodeRenderer extends DefaultTreeCellRenderer
                                       implements TreeCellRenderer
    public static Icon icon= null;
    public nodeRenderer() {
    icon = new ImageIcon(getClass().getResource("icon.gif"));
    public Component getTreeCellRendererComponent(
    JTree tree,
    Object value,
    boolean sel,
    boolean expanded,
    boolean leaf,
    int row,
    boolean hasFocus) {
    super.getTreeCellRendererComponent(
    tree, value, sel,
    expanded, leaf, row,
    hasFocus);
    treeNode node = (treeNode)(((DefaultMutableTreeNode)value).getUserObject());
    if(icon != null) // set a custom icon
    setOpenIcon(icon);
    setClosedIcon(icon);
    setLeafIcon(icon);
         return this;
    *treeNode.java
    *this is the class to represent a node
    import javax.swing.*;
    import javax.swing.tree.*;
    import java.util.*;
    import java.net.*;
    * Class used to hold information about a web site that has
    * been searched by the spider class
    public class treeNode
    *Url from the WebSpiderController Class
    *that is currently being processed
    public String msg;
    treeNode(String urlText)
         msg = urlText;
    String getUrlText()
         return msg;
    //gui.java
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import java.net.*;
    import java.io.*;
    import java.util.*;
    public class gui extends JFrame implements Runnable
         *declare variable, boolean
         *thread, a object and a center
         *pane
         protected URL urlInput;
         protected Thread bgThread;
         protected boolean run = false;
         protected WebSpider webSpider;
         public gui()
              *create the gui here
              setTitle("Testing Tool");
         setSize(600,600);
         //add Buttons to the tool bar
         start.setText("Start");
         start.setActionCommand("Start");
         toolBar.add(start);
         ButtonListener startListener = new ButtonListener();
              start.addActionListener(startListener);
              cancel.setText("Cancel");
         cancel.setActionCommand("Cancel");
         toolBar.add(cancel);
         ButtonListener cancelListener = new ButtonListener();
              cancel.addActionListener(cancelListener);
              close.setText("Close");
         close.setActionCommand("Close");
         toolBar.add(close);
         ButtonListener closeListener = new ButtonListener();
              close.addActionListener(closeListener);
              //creat a simple form
              urlLabel.setText("Enter URL:");
              urlLabel.setBounds(100,36,288,24);
              formTab.add(urlLabel);
              url.setBounds(170,36,288,24);
              formTab.add(url);
              current.setText("Currently Processing: ");
              current.setBounds(100,80,288,24);
              formTab.add(current);
         //add scroll bars to the error messages screen and website structure
         errorPane.setAutoscrolls(true);
         errorPane.setHorizontalScrollBarPolicy(javax.swing.
         ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
         errorPane.setVerticalScrollBarPolicy(javax.swing.
         ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
         errorPane.setOpaque(true);
         errorTab.add(errorPane);
         errorPane.setBounds(0,0,580,490);
         errorText.setEditable(false);
         errorPane.getViewport().add(errorText);
         errorText.setBounds(0,0,600,550);
         treePane.setAutoscrolls(true);
         treePane.setHorizontalScrollBarPolicy(javax.swing.
         ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
         treePane.setVerticalScrollBarPolicy(javax.swing.
         ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
         treePane.setOpaque(true);
         treeTab.add(treePane);
         treePane.setBounds(0,0,580,490);
         treeText.setEditable(false);
         treePane.getViewport().add(treeText);
         treeText.setBounds(0,0,600,550);
         //create the tabbed window           
    centerPane.setBorder(new javax.swing.border.EtchedBorder());
    formTab.setLayout(null);
    errorTab.setLayout(null);
    treeTab.setLayout(null);
    centerPane.addTab("Search Parameters", formTab);
    centerPane.addTab("Error Messages", errorTab);
    centerPane.addTab("Website Structure", treeTab);
              //add the tool bar and tabbed pane
              getContentPane().add(toolBar, java.awt.BorderLayout.NORTH);
    getContentPane().add(centerPane, java.awt.BorderLayout.CENTER);                    
              *create the tool bar pane, a center pane, add the buttons,
              *labels, tabs, a text field for user input here
              javax.swing.JPanel toolBar = new javax.swing.JPanel();
              javax.swing.JButton start = new javax.swing.JButton();
              javax.swing.JButton cancel = new javax.swing.JButton();
              javax.swing.JButton close = new javax.swing.JButton();      
              javax.swing.JTabbedPane centerPane = new javax.swing.JTabbedPane();
              javax.swing.JPanel formTab = new javax.swing.JPanel();
              javax.swing.JLabel urlLabel = new javax.swing.JLabel();
              javax.swing.JLabel current = new javax.swing.JLabel();
              javax.swing.JTextField url = new javax.swing.JTextField();
              javax.swing.JPanel errorTab = new javax.swing.JPanel();
              javax.swing.JTextArea errorText = new javax.swing.JTextArea();
              javax.swing.JScrollPane errorPane = new javax.swing.JScrollPane();
              javax.swing.JPanel treeTab = new javax.swing.JPanel();
              javax.swing.JTextArea treeText = new javax.swing.JTextArea();
              javax.swing.JScrollPane treePane = new javax.swing.JScrollPane();
              javax.swing.JTree searchTree = new javax.swing.JTree();
              *show the gui
              public static void main(String args[])
              (new gui()).setVisible(true);
         *listen for the button presses and set the
         *boolean flag depending on which button is pressed
         class ButtonListener implements ActionListener
              public void actionPerformed(ActionEvent event)
                   Object object = event.getSource();
                   if (object == start)
                        run = true;
                        startActionPerformed(event);
                   if (object == cancel)
                        run = false;
                        startActionPerformed(event);
                   if (object == close)
                        System.exit(0);
         *this method is called when the start or
         *cancel button is pressed.
         void startActionPerformed (ActionEvent event)
              if (run == true && bgThread == null)
                   bgThread = new Thread(this);
                   bgThread.start();
              if (run == false && bgThread != null)
                   webSpider.cancel();
         *this mehtod will start the background thred.
         *the background thread is required so that the
         *GUI is still displayed
         public void run()
              try
                   webSpider = new WebSpider(this);
                   webSpider.clear();
                   urlInput = new URL(url.getText());
                   webSpider.addURL(urlInput);
                   webSpider.run();
                   bgThread=null;
              catch (MalformedURLException e)
                   addressError addErr = new addressError();
                   addErr.addMsg = "URL ERROR - PLEASE CHECK";
                   SwingUtilities.invokeLater(addErr);
              *this method is called by the web spider
              *once a url is found. Validation of navigation
              *happens here.
              public boolean urlFound(URL urlInput,URL url)
                   CurrentlyProcessing pro = new CurrentlyProcessing();
              pro.msg = url.toString();
              SwingUtilities.invokeLater(pro);
              if (!testLink(url))
                        navigationError navErr = new navigationError();
                        navErr.navMsg = "Broken Link "+url+" caused on "+urlInput+"\n";
                        return false;
              if (!url.getHost().equalsIgnoreCase(urlInput.getHost()))
                   return false;
              else
                   return true;
              *this method is called internally to check
         *that a link works
              protected boolean testLink(URL url)
              try
                   URLConnection connection = url.openConnection();
                   connection.connect();
                   return true;
              catch (IOException e)
                   return false;
         *this method is called when an error is
         *found.
              public void URLError(URL url)
              *this method is called when an email
              *address is found
              public void emailFound(String email)
              /*this method will update any errors found inc
              *address errors and broken links
              class addressError implements Runnable
                   public String addMsg;
                   public void run()
                        errorText.append(addMsg);
                        current.setText("Currently Processing: "+ addMsg);
              class navigationError implements Runnable
                   public String navMsg;
                   public void run()
                        errorText.append(navMsg);
              *this method will update the currently
              *processing field on the GUI
              class CurrentlyProcessing implements Runnable
              public String msg;
              public void run()
                   current.setText("Currently Processing: " + msg );
    //webspider.java
    import java.util.*;
    import java.net.*;
    import java.io.*;
    import javax.swing.text.*;
    import javax.swing.text.html.*;
    import javax.swing.tree.*;
    import javax.swing.*;
    *this class implements the spider.
    public class WebSpider extends HTMLEditorKit
         *make a collection of the URL's
         protected Collection urlErrors = new ArrayList(3);
         protected Collection urlsWaiting = new ArrayList(3);
         protected Collection urlsProcessed = new ArrayList(3);
         //report URL's to this class
         protected gui report;
         *this flag will indicate whether the process
         *is to be cancelled
         protected boolean cancel = false;
         *The constructor
         *report the urls to the wui class
         public WebSpider(gui report)
         this.report = report;
         *get the urls from the above declared
         *collections
         public Collection getUrlErrors()
         return urlErrors;
         public Collection getUrlsWaiting()
         return urlsWaiting;
         public Collection getUrlsProcessed()
         return urlsProcessed;
         * Clear all of the collections.
         public void clear()
         getUrlErrors().clear();
         getUrlsWaiting().clear();
         getUrlsProcessed().clear();
         *Set a flag that will cause the begin
         *method to return before it is done.
         public void cancel()
         cancel = true;
         *add the entered url for porcessing
         public void addURL(URL url)
         if (getUrlsWaiting().contains(url))
              return;
         if (getUrlErrors().contains(url))
              return;
         if (getUrlsProcessed().contains(url))
              return;
         /*WRITE TO LOG FILE*/
         log("Adding to workload: " + url );
         getUrlsWaiting().add(url);
         *process a url
         public void processURL(URL url)
         try
              /*WRITE TO LOGFILE*/
              log("Processing: " + url );
              // get the URL's contents
              URLConnection connection = url.openConnection();
              if ((connection.getContentType()!=null) &&
         !connection.getContentType().toLowerCase().startsWith("text/"))
              getUrlsWaiting().remove(url);
              getUrlsProcessed().add(url);
              log("Not processing because content type is: " +
         connection.getContentType() );
                   return;
         // read the URL
         InputStream is = connection.getInputStream();
         Reader r = new InputStreamReader(is);
         // parse the URL
         HTMLEditorKit.Parser parse = new HTMLParse().getParser();
         parse.parse(r,new Parser(url),true);
    catch (IOException e)
         getUrlsWaiting().remove(url);
         getUrlErrors().add(url);
         log("Error: " + url );
         report.URLError(url);
         return;
    // mark URL as complete
    getUrlsWaiting().remove(url);
    getUrlsProcessed().add(url);
    log("Complete: " + url );
    *start the spider
    public void run()
    cancel = false;
    while (!getUrlsWaiting().isEmpty() && !cancel)
         Object list[] = getUrlsWaiting().toArray();
         for (int i=0;(i<list.length)&&!cancel;i++)
         processURL((URL)list);
    * A HTML parser callback used by this class to detect links
    protected class Parser extends HTMLEditorKit.ParserCallback
    protected URL urlInput;
    public Parser(URL urlInput)
    this.urlInput = urlInput;
    public void handleSimpleTag(HTML.Tag t,MutableAttributeSet a,int pos)
    String href = (String)a.getAttribute(HTML.Attribute.HREF);
    if((href==null) && (t==HTML.Tag.FRAME))
    href = (String)a.getAttribute(HTML.Attribute.SRC);
    if (href==null)
    return;
    int i = href.indexOf('#');
    if (i!=-1)
    href = href.substring(0,i);
    if (href.toLowerCase().startsWith("mailto:"))
    report.emailFound(href);
    return;
    handleLink(urlInput,href);
    public void handleStartTag(HTML.Tag t,MutableAttributeSet a,int pos)
    handleSimpleTag(t,a,pos); // handle the same way
    protected void handleLink(URL urlInput,String str)
    try
         URL url = new URL(urlInput,str);
    if (report.urlFound(urlInput,url))
    addURL(url);
    catch (MalformedURLException e)
    log("Found malformed URL: " + str);
    *log the information of the spider
    public void log(String entry)
    System.out.println( (new Date()) + ":" + entry );
    I have a seperate class for parseing the HTML. Any help would be greatly appreciated
    mrv

    Hi Sorry to be a pain again,
    I have re worked the gui class so it looks like this now:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import javax.swing.event.*;
    import java.net.*;
    import java.io.*;
    import java.util.*;
    public class gui extends JFrame implements Runnable
         *declare variable, boolean
         *thread, a object and a center
         *pane
         protected URL urlInput;
         protected Thread bgThread;
         protected boolean run = false;
         protected WebSpider webSpider;
         public String msgInfo;
         public String brokenUrl;
         public String goodUrl;
         public String deadUrl;
         protected DefaultMutableTreeNode rootNode;
    protected DefaultTreeModel treeModel;
         public gui()
              *create the gui here
              setTitle("Testing Tool");
         setSize(600,600);
         //add Buttons to the tool bar
         start.setText("Start");
         start.setActionCommand("Start");
         toolBar.add(start);
         ButtonListener startListener = new ButtonListener();
              start.addActionListener(startListener);
              cancel.setText("Cancel");
         cancel.setActionCommand("Cancel");
         toolBar.add(cancel);
         ButtonListener cancelListener = new ButtonListener();
              cancel.addActionListener(cancelListener);
              close.setText("Close");
         close.setActionCommand("Close");
         toolBar.add(close);
         ButtonListener closeListener = new ButtonListener();
              close.addActionListener(closeListener);
              //creat a simple form
              urlLabel.setText("Enter URL:");
              urlLabel.setBounds(100,36,288,24);
              formTab.add(urlLabel);
              url.setBounds(170,36,288,24);
              formTab.add(url);
              current.setText("Currently Processing: ");
              current.setBounds(100,80,288,24);
              formTab.add(current);
         //add scroll bars to the error messages screen and website structure
         errorPane.setAutoscrolls(true);
         errorPane.setHorizontalScrollBarPolicy(javax.swing.
         ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
         errorPane.setVerticalScrollBarPolicy(javax.swing.
         ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
         errorPane.setOpaque(true);
         errorTab.add(errorPane);
         errorPane.setBounds(0,0,580,490);
         errorText.setEditable(false);
         errorPane.getViewport().add(errorText);
         errorText.setBounds(0,0,600,550);
         treePane.setAutoscrolls(true);
         treePane.setHorizontalScrollBarPolicy(javax.swing.
         ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
         treePane.setVerticalScrollBarPolicy(javax.swing.
         ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
         treePane.setOpaque(true);
         treeTab.add(treePane);
         treePane.setBounds(0,0,580,490);
         treeText.setEditable(false);
         treePane.getViewport().add(treeText);
         treeText.setBounds(0,0,600,550);
         //JTree
         // NEW CODE
         rootNode = new DefaultMutableTreeNode("Root Node");
         treeModel = new DefaultTreeModel(rootNode);
         treeModel.addTreeModelListener(new MyTreeModelListener());
         tree = new JTree(treeModel);
         tree.setEditable(true);
         tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
    tree.setShowsRootHandles(true);
         treeText.add(tree);
         //create the tabbed window           
    centerPane.setBorder(new javax.swing.border.EtchedBorder());
    formTab.setLayout(null);
    errorTab.setLayout(null);
    treeTab.setLayout(null);
    centerPane.addTab("Search Parameters", formTab);
    centerPane.addTab("Error Messages", errorTab);
    centerPane.addTab("Website Structure", treeTab);
              //add the tool bar and tabbed pane
              getContentPane().add(toolBar, java.awt.BorderLayout.NORTH);
    getContentPane().add(centerPane, java.awt.BorderLayout.CENTER);     
              *create the tool bar pane, a center pane, add the buttons,
              *labels, tabs, a text field for user input here
              javax.swing.JPanel toolBar = new javax.swing.JPanel();
              javax.swing.JButton start = new javax.swing.JButton();
              javax.swing.JButton cancel = new javax.swing.JButton();
              javax.swing.JButton close = new javax.swing.JButton();      
              javax.swing.JTabbedPane centerPane = new javax.swing.JTabbedPane();
              javax.swing.JPanel formTab = new javax.swing.JPanel();
              javax.swing.JLabel urlLabel = new javax.swing.JLabel();
              javax.swing.JLabel current = new javax.swing.JLabel();
              javax.swing.JTextField url = new javax.swing.JTextField();
              javax.swing.JPanel errorTab = new javax.swing.JPanel();
              javax.swing.JTextArea errorText = new javax.swing.JTextArea();
              javax.swing.JScrollPane errorPane = new javax.swing.JScrollPane();
              javax.swing.JPanel treeTab = new javax.swing.JPanel();
              javax.swing.JTextArea treeText = new javax.swing.JTextArea();
              javax.swing.JScrollPane treePane = new javax.swing.JScrollPane();
              javax.swing.JTree tree = new javax.swing.JTree();
              *show the gui
              public static void main(String args[])
              (new gui()).setVisible(true);
         *listen for the button presses and set the
         *boolean flag depending on which button is pressed
         class ButtonListener implements ActionListener
              public void actionPerformed(ActionEvent event)
                   Object object = event.getSource();
                   if (object == start)
                        run = true;
                        startActionPerformed(event);
                   if (object == cancel)
                        run = false;
                        startActionPerformed(event);
                   if (object == close)
                        System.exit(0);
         *this method is called when the start or
         *cancel button is pressed.
         void startActionPerformed (ActionEvent event)
              if (run == true && bgThread == null)
                   bgThread = new Thread(this);
                   bgThread.start();
                   //new line of code
                   treeText.addObject(msgInfo);
              if (run == false && bgThread != null)
                   webSpider.cancel();
         *this mehtod will start the background thred.
         *the background thread is required so that the
         *GUI is still displayed
         public void run()
              try
                   webSpider = new WebSpider(this);
                   webSpider.clear();
                   urlInput = new URL(url.getText());
                   webSpider.addURL(urlInput);
                   webSpider.run();
                   bgThread = null;
              catch (MalformedURLException e)
                   addressError addErr = new addressError();
                   addErr.addMsg = "URL ERROR - PLEASE CHECK";
                   SwingUtilities.invokeLater(addErr);
              *this method is called by the web spider
              *once a url is found. Validation of navigation
              *happens here.
              public boolean urlFound(URL urlInput,URL url)
                   CurrentlyProcessing pro = new CurrentlyProcessing();
              pro.msg = url.toString();
              SwingUtilities.invokeLater(pro);
              if (!testLink(url))
                        navigationError navErr = new navigationError();
                        navErr.navMsg = "Broken Link "+url+" caused on "+urlInput+"\n";
                        brokenUrl = url.toString();
                        return false;
              if (!url.getHost().equalsIgnoreCase(urlInput.getHost()))
                   return false;
              else
                   return true;
              *this method is returned if there is no link
              *on a web page, e.g. there us a dead end
              public void urlNotFound(URL urlInput)
                        deadEnd dEnd = new deadEnd();
                        dEnd.dEMsg = "No links on "+urlInput+"\n";
                        deadUrl = urlInput.toString();               
              *this method is called internally to check
         *that a link works
              protected boolean testLink(URL url)
              try
                   URLConnection connection = url.openConnection();
                   connection.connect();
                   goodUrl = url.toString();
                   return true;
              catch (IOException e)
                   return false;
         *this method is called when an error is
         *found.
              public void urlError(URL url)
              *this method is called when an email
              *address is found
              public void emailFound(String email)
              /*this method will update any errors found inc
              *address errors and broken links
              class addressError implements Runnable
                   public String addMsg;
                   public void run()
                        current.setText("Currently Processing: "+ addMsg);
                        errorText.append(addMsg);
              class navigationError implements Runnable
                   public String navMsg;
                   public void run()
                        errorText.append(navMsg);
              class deadEnd implements Runnable
                   public String dEMsg;
                   public void run()
                        errorText.append(dEMsg);
              *this method will update the currently
              *processing field on the GUI
              public class CurrentlyProcessing implements Runnable
                   public String msg;
              //new line
              public String msgInfo = msg;
              public void run()
                   current.setText("Currently Processing: " + msg );
         * NEW CODE
         * NEED THIS CODE SOMEWHERE
         * treeText.addObject(msgInfo);
         public DefaultMutableTreeNode addObject(Object child)
         DefaultMutableTreeNode parentNode = null;
         TreePath parentPath = tree.getSelectionPath();
         if (parentPath == null)
         parentNode = rootNode;
         else
         parentNode = (DefaultMutableTreeNode)
    (parentPath.getLastPathComponent());
         return addObject(parentNode, child, true);
         public DefaultMutableTreeNode addObject(DefaultMutableTreeNode parent,
    Object child)
         return addObject(parent, child, false);
         public DefaultMutableTreeNode addObject(DefaultMutableTreeNode parent,
         Object child,boolean shouldBeVisible)
         DefaultMutableTreeNode childNode = new DefaultMutableTreeNode(child);
         if (parent == null)
         parent = rootNode;
         treeModel.insertNodeInto(childNode, parent, parent.getChildCount());
         if (shouldBeVisible)
         tree.scrollPathToVisible(new TreePath(childNode.getPath()));
              return childNode;
         public class MyTreeModelListener implements TreeModelListener
              public void treeNodesChanged (TreeModelEvent e)
                   DefaultMutableTreeNode node;
                   node = (DefaultMutableTreeNode)
                   (e.getTreePath().getLastPathComponent());
                   try
                        int index = e.getChildIndices()[0];
                        node = (DefaultMutableTreeNode)
                        (node.getChildAt(index));
                   catch (NullPointerException exc)
              public void treeNodesInserted(TreeModelEvent e)
              public void treeStructureChanged(TreeModelEvent e)
              public void treeNodesRemoved(TreeModelEvent e)
    I beleive that this line of code is required:
    treeText.addObject(msgInfo);
    I have placed it where the action events start the spider, but i keep getting this error:
    cannot resolve symbol
    symbol : method addObject (java.lang.String)
    location: class javax.swing.JTextArea
    treeText.addObject(msgInfo);
    Also the jtree is not showing the window that I want it to and I am not too sure why. could you have a look to see why? i think it needs a fresh pair of eyes.
    Many thanks
    MrV

  • Help with displaying BLOBs in OBIEE 11g

    I am trying to get OBIEE 11g to display photographs in an Analysis report. I know BLOB fields are not supported, and I have been reading posts on this board and following examples on internet sites that try to get round this problem. But, try as I might, I cannot get those pesky photos to display.
    Below are all the steps I have followed. Sorry that there is a lot to read, but I was hoping that somebody has been successful in doing this, and may spot something in one of my steps that I am doing wrong.
    ORACLE TRANSACTIONAL SOURCE_
    Table : EMPL_PHOTO
    Fields:
    USN VARCHAR2(11) ( Unique Key )
    EMPLOYEE_PHOTO BLOB ( I think the photos are stored as 'png' )
    ORACLE WAREHOUSE SOURCE_
    Table : D_PERSON_PHOTO_LKUP
    Fields :
    PERSON_KEY     NUMBER(38,0) ( Primary Key - Surrogate )
    USN     VARCHAR2(11)
    PHOTO     CLOB
    BLOB to CLOB conversion.
    I used this function :
         create or replace function blob_to_clob_base64(p_data in blob)
         return clob
         is
         l_bufsize integer := 16386;
         l_buffer raw(16386);
         l_offset integer default 1;
         l_result clob;
         begin
         dbms_lob.createtemporary(l_result, false, dbms_lob.call);
         loop
         begin
         dbms_lob.read(p_data, l_bufsize, l_offset, l_buffer);
         exception
         when no_data_found then
         exit;
         end;
         l_offset := l_offset + l_bufsize;
         dbms_lob.append(l_result, to_clob(utl_raw.cast_to_varchar2(utl_encode.base64_encode(l_buffer))));
         end loop;
         return l_result;
         end;
         select usn, employee_photo ,
         BLOB_TO_CLOB_BASE64(employee_photo)
         from empl_photo
    IN OBIEE ADMINISTRATION TOOL_
    *1) Physical Layer*
    Added D_PERSON_PHOTO_LKUP from Connection Pool
    Left it as 'Cachable'
    Didn't join it to any tables
    Changed field PHOTO to a 'LONGVARCHAR' length 100000
    Set USN as the Key ( not the surrogate key )
    *2) BMM Layer*
    Dragged D_PERSON_PHOTO_LKUP across.
    Renamed it to 'LkUp - Photo'
    Ticked the 'lookup table' box
    Removed the surrogate key
    Kept USN as the Primary key
    The icon shows it similar to a Fact table, with a yellow key and green arrow.
    On Dimension table D_PERSON_DETAILS (Dim - P01 - Person Details) added a new logical column
    Called it 'Photo'
    Changed the column source to be derived from an expression.
    Set the expression to be :
    Lookup(DENSE
    "People"."LkUp - Photo"."PHOTO",
    "People"."Dim - P01 - Person Details"."USN" )
    Icon now shows an 'fx' against it.
    Note: This table also had it Surrogate key removed, and USN setting as primary key.
    *3) Presentation Layer*
    Dragged the new Photo field across.
    Saved Repository file, uploaded, and restarted server.
    ONLINE OBIEE_
    Created a new Analysis.
    Selected USN from 'Person Details'
    Selected Photo from 'Person Details'
    Selected a measure from the Fact table
    Under column properties of Photo ( data format ) :
    - Ticked 'Override Default Data Format' box
    - Set to Image URL
    - Custom text format changed to : @[html]"<img alt="" src=""@H"">"
    Under column properties of Photo ( edit formula ) :
    - Changed to : 'data:image/png;base64,'||"Person Details"."Photo"
    The Advanced tab shows the sql as :
         SELECT
         0 s_0,
         "People"."Person Details"."USN" s_1,
         'data:image/png;base64,'||"People"."Person Details"."Photo" s_2,
         "People"."MEASURE"."Count" s_3
         FROM "People"
         ORDER BY 1, 2 ASC NULLS LAST, 3 ASC NULLS LAST
         FETCH FIRST 65001 ROWS ONLY
    Going into the 'results' tab, get error message:
    +State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 17001] Oracle Error code: 932, message: ORA-00932: inconsistent datatypes: expected - got CLOB at OCI call OCIStmtExecute. [nQSError: 17010] SQL statement preparation failed. (HY000)+
    It doesn't seem to be using the Lookup table, but can't work out at which step I have gone wrong.
    Any help would be appreciated.
    Thanks

    Thanks, yes I followed http://docs.oracle.com/cd/E28280_01/bi.1111/e10540/busmodlayer.htm#BGBDBDHI, but when I get to the part of setting the LOOKUP function on th Physical source, only ONE physical source is displayed. I need TWO sources ( The Employee Table, and the Photo LookUp.
    I have raised this as an error with Oracle. We are now on OBIEE 11.1.1.7, but Oracle say BLOBS are still not supported in that release. It will be fixed in 11.1.1.8 and it will be backported into 11.1.1.6.11
    In the meantime we have abandoned showing Photo's in any of our reports.

  • Help with displaying my xml file in my jtext area

    Hi i am trying to read the data from my xml file and display it once the user clicks on the list all button.
    below is the source code for my program can someone please tell me some code to this.
    package tractorgui;
    import java.awt.BorderLayout;
    import java.awt.GridLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.beans.XMLEncoder;
    import java.io.BufferedReader;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.FileReader;
    import java.beans.XMLDecoder;
    import javax.swing.*;
    import javax.swing.border.LineBorder;
    //import tractor.TextInputPrompt;
    import tractor.Tractor;
    * This code was edited or generated using CloudGarden's Jigloo
    * SWT/Swing GUI Builder, which is free for non-commercial
    * use. If Jigloo isbeing used commercially (ie, by a corporation,
    * company or business for any purpose whatever) then you
    * should purchase a license for each developer using Jigloo.
    * Please visit www.cloudgarden.com for details.
    * Use of Jigloo implies acceptance of these licensing terms.
    * A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
    * THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
    * LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
    public class NewSwingApp extends javax.swing.JFrame {
    //          //Set Look & Feel
    //          try {
    //               javax.swing.UIManager.setLookAndFeel("com.jgoodies.looks.plastic.Plastic3DLookAndFeel");
    //          } catch(Exception e) {
    //               e.printStackTrace();
              private static final long serialVersionUID = 1L;
         private JButton searchmanufacturer;
         private JButton jButton3;
         private JLabel companyname;
         private JPanel labelpannel;
         private JButton listall;
         private JPanel MenuButtons;
         private JButton archivetractor;
         private JTextArea outputscreen;
         private JButton exhibittractor;
         private JButton deletetractor;
         private JButton addtractor;
         private JButton listallexbited;
         private Tractor [ ] tractors;
         private JScrollPane jScrollPane2;
         private JScrollPane jScrollPane1;
    private int numberOfTractors;
         * Auto-generated main method to display this JFrame
         public static void main(String[] args) {
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        NewSwingApp inst = new NewSwingApp();
                        inst.setLocationRelativeTo(null);
                        inst.setVisible(true);
         public NewSwingApp() {
              super();
              initGUI();
         private void initGUI() {
              try {
                   BorderLayout thisLayout = new BorderLayout();
                   getContentPane().setLayout(thisLayout);
                   this.setPreferredSize(new java.awt.Dimension(750, 700));
                        labelpannel = new JPanel();
                        BorderLayout labelpannelLayout = new BorderLayout();
                        getContentPane().add(labelpannel, BorderLayout.NORTH);
                        labelpannel.setLayout(labelpannelLayout);
                        jButton3 = new JButton();
                        getContentPane().add(getExitsystem(), BorderLayout.SOUTH);
                        jButton3.setText("Exit System");
                        jButton3.setPreferredSize(new java.awt.Dimension(609, 57));
                        jButton3.setBackground(new java.awt.Color(0,255,255));
                        jButton3.setForeground(new java.awt.Color(0,0,0));
                        jButton3.setFont(new java.awt.Font("Arial",1,24));
                        jButton3.addActionListener(new ActionListener() {
                             public void actionPerformed(ActionEvent evt) {
                                            System.exit(0);
                        MenuButtons = new JPanel();
                        getContentPane().add(MenuButtons, BorderLayout.WEST);
                        GridLayout MenuButtonsLayout = new GridLayout(7, 1);
                        MenuButtonsLayout.setColumns(1);
                        MenuButtonsLayout.setRows(7);
                        MenuButtonsLayout.setHgap(5);
                        MenuButtonsLayout.setVgap(5);
                        MenuButtons.setLayout(MenuButtonsLayout);
                        MenuButtons.setPreferredSize(new java.awt.Dimension(223, 267));
                             listall = new JButton();
                             MenuButtons.add(getListall());
                             listall.setText("List All");
                             listall.setBackground(new java.awt.Color(0,255,255));
                             listall.setForeground(new java.awt.Color(0,0,0));
                             listall.setBorder(new LineBorder(new java.awt.Color(0,0,0), 1, false));
                             listall.setFont(new java.awt.Font("Arial",2,14));
                             listall.addActionListener(new ActionListener() {
                                  /* (non-Javadoc)
                                  * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
                                  public void actionPerformed(ActionEvent evt) {
                                       String XMLFile = "tractor.xml-courseworkasignment/src";
                                       //** Prints the contents of my XML file
                                       try {
                                       String s;
                                       BufferedReader in = new BufferedReader( new FileReader(XMLFile)
                                       outputscreen.setText("File successfully opened");
                                       try {
                                       while ( (s=in.readLine()) !=null)
                                       outputscreen.append(s);
                                       catch(Exception e) {
                                            outputscreen.append("Error reading line: " + e.getMessage());
                                       outputscreen.append("End of Document");
                                       catch(FileNotFoundException e) {
                                            outputscreen.append("Error in opening file: " + e.getMessage());
                             listallexbited = new JButton();
                             MenuButtons.add(getListallexbited());
                             listallexbited.setText("List All Tractors On Exhibition ");
                             listallexbited.setPreferredSize(new java.awt.Dimension(157, 57));
                             listallexbited.setBackground(new java.awt.Color(0,255,255));
                             listallexbited.setForeground(new java.awt.Color(64,0,0));
                             listallexbited.addActionListener(new ActionListener() {
                                  public void actionPerformed(ActionEvent evt) {
                                       outputscreen.repaint();
                                       String XMLFile = "C:tractor.xml";
                                  // Print contents of XML file
                                  try {
                                  String s;
                                  BufferedReader in = new BufferedReader( new FileReader(XMLFile)
                                  outputscreen.setText("File successfully opened");
                                  try {
                                  while ( (s=in.readLine()) !=null)
                                  outputscreen.append(s);
                                  catch(Exception e) {
                                       outputscreen.append("Error reading line: " + e.getMessage());
                                  outputscreen.append("End of Document");
                                  catch(FileNotFoundException e) {
                                       outputscreen.append("Error in opening file: " + e.getMessage());
                             addtractor = new JButton();
                             MenuButtons.add(getAddtractor());
                             addtractor.setText("Add Tractor ");
                             addtractor.setBackground(new java.awt.Color(0,255,255));
                             addtractor.setForeground(new java.awt.Color(64,0,0));
                             addtractor.addActionListener(new ActionListener() {
                                  public void actionPerformed(ActionEvent evt) {
                                       String manufacturer =JOptionPane.showInputDialog(getComponent(0), "Enter Manufacturer of Tractor");
                                       String shp = (JOptionPane.showInputDialog(getComponent(0), "Enter Horse Power of Tractor"));
                                       int hp =Integer.parseInt(shp);
                                       int sisRare =Integer.parseInt(JOptionPane.showInputDialog(getComponent(0), "Enter If the Tractor is rare (1=Yes/2=No)"));
                                       boolean isRare;
                                       if (sisRare== 1) {
                                       isRare =true;     
                                       }else
                                            isRare =false;
                                       String yom= JOptionPane.showInputDialog(getComponent(0), "Enter Year of Manufacture");
                                       int yearOfManufacture =Integer.parseInt(yom);
                                       String yis =JOptionPane.showInputDialog(getComponent(0), "Enter Number of years the Tractor has been in service");
                                       int yearsInService =Integer.parseInt(yis);
                                       String svalue = JOptionPane.showInputDialog(getComponent(0), "Enter Tractor's Value (?Pounds)");
                                       double value = Double.parseDouble(svalue);
                                       String lastWorkPlace =JOptionPane.showInputDialog(getComponent(0), "Enter Last Workplace");
                                            if(NewSwingApp.addTractor(new Tractor(manufacturer, hp, isRare, yearOfManufacture, yearsInService, value, lastWorkPlace, false)))
                                       JOptionPane.showMessageDialog((getComponent(0)), "Tractor Added");
                                       else
                                            JOptionPane.showMessageDialog(getComponent(0), "Could not Add Tractor");
                             deletetractor = new JButton();
                             MenuButtons.add(getDeletetractor());
                             deletetractor.setText("Delete Tractor ");
                             deletetractor.setBackground(new java.awt.Color(0,255,255));
                             deletetractor.setForeground(new java.awt.Color(64,0,0));
                             deletetractor.addActionListener(new ActionListener() {
                                  public void actionPerformed(ActionEvent evt) {
                                       System.out.println("deletetractor.actionPerformed, event="+evt);
                                       JOptionPane.showInputDialog(getComponent(0), "Enter Tractor ID");
                             exhibittractor = new JButton();
                             MenuButtons.add(getExhibittractor());
                             exhibittractor.setText("Exhibit Tractor");
                             exhibittractor.setBackground(new java.awt.Color(0,255,255));
                             exhibittractor.setForeground(new java.awt.Color(0,0,0));
                             exhibittractor.addActionListener(new ActionListener() {
                                  public void actionPerformed(ActionEvent evt) {
                                       System.out.println("exhibittractor.actionPerformed, event="+evt);
                                       JOptionPane.showInputDialog(getComponent(0), "Enter Tractor I.D");
                             archivetractor = new JButton();
                             MenuButtons.add(getArchivetractor());
                             archivetractor.setText("Archive Tractor");
                             archivetractor.setBackground(new java.awt.Color(0,255,255));
                             archivetractor.setForeground(new java.awt.Color(0,0,0));
                             archivetractor.addActionListener(new ActionListener() {
                                  public void actionPerformed(ActionEvent evt) {
                                       System.out.println("archivetractor.actionPerformed, event="+evt);
                                       JOptionPane.showInputDialog(getComponent(0), "Enter Tractor I.D");
                             searchmanufacturer = new JButton();
                             MenuButtons.add(searchmanufacturer);
                             searchmanufacturer.setText("Search Manufacturer");
                             searchmanufacturer.setPreferredSize(new java.awt.Dimension(159, 21));
                             searchmanufacturer.setBackground(new java.awt.Color(0,255,255));
                             searchmanufacturer.setForeground(new java.awt.Color(64,0,0));
                             searchmanufacturer.addActionListener(new ActionListener() {
                                  public void actionPerformed(ActionEvent evt) {
                                       System.out.println("searchmanufacturer.actionPerformed, event="+evt);
                                       JOptionPane.showInputDialog(getComponent(0), "Enter Manufacturer Name");
                        outputscreen = new JTextArea();
                        getContentPane().add(outputscreen, BorderLayout.CENTER);
                        outputscreen
                                  .setText("");
                        outputscreen.setBorder(BorderFactory.createTitledBorder(""));
                        outputscreen.setWrapStyleWord(true);
                        outputscreen.setEditable(false);
                        outputscreen.setEnabled(true);
                        outputscreen.setBackground(new java.awt.Color(255, 255, 255));
                        outputscreen.setForeground(new java.awt.Color(64, 0, 0));
                        companyname = new JLabel();
                        getContentPane().add(companyname, BorderLayout.NORTH);
                        companyname.setText(" Wolvesville Tractor Museum");
                        companyname.setPreferredSize(new java.awt.Dimension(609, 85));
                        companyname.setBackground(new java.awt.Color(255,255,0));
                        companyname.setFont(new java.awt.Font("Arial",1,28));
                        companyname.setForeground(new java.awt.Color(0,0,0));
                        companyname.setBorder(BorderFactory.createTitledBorder(""));
                        companyname.setOpaque(true);
                   this.setSize(750, 750);
              } catch (Exception e) {
                   e.printStackTrace();
         protected static boolean addTractor(Tractor tractor) {
                   if (tractor.getManufacturer()==null) return false; else
                   if (tractor.getHp()<50||tractor.getHp()>1100) return false; else
                   if (tractor.getIsRare()==false) return false; else
                   if (tractor.getYearsInService()<1||tractor.getYearsInService()>200) return false; else
                   if (tractor.getYearOfManufacture()<1800||tractor.getYearOfManufacture()>2008) return false; else
                   if (tractor.getValue()<100||tractor.getValue()>1500) return false; else
                   if (tractor.getLastWorkPlace()==null) return false; else
              return true;
         public JPanel getMenuButtons() {
              return MenuButtons;
         public JButton getListall() {
              return listall;
         public JLabel getCompanyname() {
              return companyname;
         public JButton getExitsystem() {
              return jButton3;
         public JButton getSearchmanufacturer() {
              return searchmanufacturer;
         public JButton getListallexbited() {
              return listallexbited;
         public JButton getAddtractor() {
              return addtractor;
         public JButton getDeletetractor() {
              return deletetractor;
         public JButton getExhibittractor() {
              return exhibittractor;
         public JButton getArchivetractor() {
              return archivetractor;
         public JTextArea getOutputscreenx() {
              return outputscreen;
    public void savetractors () {
         try {
              XMLEncoder encoder = new XMLEncoder(new FileOutputStream("tractor.xml"));
              encoder.writeObject(tractors);
              encoder.close();
         } catch (FileNotFoundException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
    public void loadtractors () {
    try {
              XMLDecoder decoder = new XMLDecoder(new FileInputStream("tractor.xml"));
              tractors = (Tractor[]) decoder.readObject();
              decoder.close();
              for (int i=0; i<tractors.length;i++) {
                   if (tractors!=null)numberOfTractors =i;
              numberOfTractors++;
         } catch (FileNotFoundException e) {
              // TODO Auto-generated catch block
              tractors=new Tractor[25];
              numberOfTractors=0;

    here's an example:
    http://jdj.sys-con.com/read/37550.htm
    you need to have a class Tractor with all those properties and then use readObject.Somehow you need to tell the Encoder/Decoder what Tractor means..
    hope this helps!!

  • AT300 - need help with display brightness

    Hello! Help solve the problem with the AT300 tablet.
    Balanced consumption charge off, automatic brightness control is also disabled. But when watching videos, surfing and gaming brightness still varies depending on the color of the image. If the image is dark, the brightness decreases, if the picture is brighter - the screen gets brighter. How do to fix the brightness?
    Thanks!

    Hello,
    I have the same problem like flash85.
    When I scroll down on bright websites and a darker picture is shown on the screen,
    the whole display becomes much darker and even the colors on the screen change.
    Yesterday I've tried the same website on an IPad and the background and colors perfectly
    stays the same.
    Also the display permanently dimms down or up if the automatic brightness control is
    enabled. This is also very disturbing.
    I can't imagine that this behaviour is normal. I read many tests before and none of it mentioned this.

  • Help with Display, it will not rotate/orient to landscape

    I have not dropped my phone or damaged it in any way. I have tried resetting it and still nothing.
    Yesterday night it was able to rotate and orient itself to landscape view just fine. Today, nothing. Does anyone know how to troubleshoot this? I am clueless. Google searching does not help.

    Just curious... When you tried rotating the phone, was it lying down on it's back or was it perpendicular to the floor? I noticed with my phone that the display will not rotate if I held it with it's back parallel to the floor but it works perfectly when it is perpendicular to the floor.

  • Help with displaying output of javac

    Hi, I got some code from this forum that helped me
    to implement buttons with Action for compiling java code. Any output or exception generated can be displayed to JTextArea.
    However, just found out the code I got hangs in cases
    when there seems to be lots of exception in source code. (i.e. Nothing displayed on JTextArea )
    I list the code below, can someone tell me what I need to do to display output in JTextArea properly??
    /* Usage
    java OutputCapture javac MyClass.java
    java OutputCapture java MyClass
    import java.io.*;
    import java.util.*;
    import javax.swing.*;
    public class OutputCapture {
    public static void main(String[] args)
    JFrame frame = new JFrame();
    JPanel panel = new JPanel();
    JTextArea tArea = new JTextArea("",8,20);
    tArea.setLineWrap(true);
    tArea.setWrapStyleWord(true);
    JScrollPane pane = new JScrollPane(tArea);
    panel.add(pane);
    frame.getContentPane().add(panel);
    frame.setSize(300,300);
    frame.setVisible(true);
    String runString = "c:\\java\\bin\\"+ args[0]+ ".exe " + args[1] + "";
    String output;
    try
    Process p = Runtime.getRuntime().exec(runString);
    Vector streams = new Vector();
    streams.addElement(p.getInputStream());
    streams.addElement(p.getErrorStream());
    BufferedReader reader = new BufferedReader(new InputStreamReader(new SequenceInputStream(streams.elements())));
    while ((output = reader.readLine()) != null)
    tArea.append(output + "\n");
    reader.close();
    catch(Exception e) { e.printStackTrace(); }
    </pre>
    * Can someone please list the code for displaying
    output of compiling/runnning app with Runtime.exe()
    command in JTextArea properly? (this is driving me
    nut)
    Thanks
    Okidoki

    Hi
    I tried your code and it still doesn't work.
    It simple hangs there now without output to
    screen. Can you be more specific? I have
    provided your code below and a class with
    bug to be compiled by your code.
    Can you show me how the output of compiling can
    be shown to screen or to a file through
    your method?
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    public class Exec {
         public Exec(String app) throws Exception {
              Process process = null;
              //final OutputStream out;
              final InputStream err, out;
              process = Runtime.getRuntime().exec(app);
              //out = process.getOutputStream();
              out = process.getInputStream();
              err = process.getErrorStream();
              Runnable r = new Runnable() {
                   public void run() {
                        Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
                        try {
                             while(true) {
                                  int i = out.available();
                                  int j = err.available();
                                  if(i > 0) {
                                       byte[] b = new byte;
                                       out.read(b);
                                       //System.err.write(b);
                                       System.err.println(b);
                                  if (j > 0) {
                                       byte[] b = new byte[j];
                                       err.read(b);
                                       //System.err.write(b);
                                       System.err.println(b);
                             } // while
                        } catch (IOException e) {
                             System.err.println(e);     
              new Thread(r).start();
              process.destroy();
         public static void main(String[] args) {
              try {
                   //String s = "c:\\JBuilder5\\jdk1.3\\bin\\javac.exe FontColorDialog.java";
                   String s = "c:\\JBuilder5\\jdk1.3\\bin\\javac.exe test2.java";
                   new Exec(s);
              } catch (Exception e) {
                   System.err.println(e);
    //==================================
    // Testing class
    //import javax.swing.*; // Uncommented here on purpose
    public class test2 {
         public static void main( String args[] ) {
              System.out.println("Hello World!");
              JTextField jtf = new JTextField();
              System.out.println("Font: " + jtf.getFont().toString() );
    Thanks

  • Help with displaying errors in jsp using html:errors/

    Here is my problem.
    In my overridden ActionForm.validate() method, i am returning ActionErrors (as required). When there are input errors in my form submission, the control goes back to the JSP page i used to read user input (so far so good). The JSP page is rendered fine for taking input for the second time but no errors are displayed although i am using the tag <html:errors/>
    I tried to find the org.apache.struts.action.ERROR in my request attributes and it is there with the size of 1 (because i am reporting one error, in my sample run). Any idea why <html:errors/> won't display the errors even though they are there??? Here is what i am doing in my ActionForm class:
    public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
    ActionErrors errors = new ActionErrors();
    if (this.email == null || this.email.length() < 1) {
    errors.add("username", new ActionError
    ("error.username.required"));
    return errors;
    Any help is appreciated.

    First of all, thanks for taking time to look at my message. Here is how my message-resources tag look like in struts-config.xml file:
    <message-resources parameter="ApplicationResources"/>
    The "ApplicationResources.properties" file exist in the WEB-INF folder of my application and following are the entries in that file that i think are relevant:
    errors.header=<h3><font color="red">Validation Error</font></h3>You must correct the following error(s) before proceeding:<ul>
    errors.footer=</ul><hr>
    error.username.required=<li>Username is required</li>
    Is there anything else needed to go into resource file? Or should i put my resource file somewhere else?

  • Nearly there but not quite - Please help with display issue

    Hi,
    I had an issue with my mac starting which I resolved by replacing the graphics card. The mac now starts without issue BUT!
    In display preferences there is only one display resolution, no detect display button and if I try to calibrate the sliders have no effect
    I have tried resetting PRAM and SMC with no effect and also tried a different monitor
    Hardware Overview:
      Model Name:          Mac Pro
      Model Identifier:          MacPro3,1
      Processor Name:          Quad-Core Intel Xeon
      Processor Speed:          3 GHz
      Number Of Processors:          2
      Total Number Of Cores:          8
      L2 Cache (per processor):          12 MB
      Memory:          8 GB
      Bus Speed:          1.6 GHz
      Boot ROM Version:          MP31.006C.B05
      SMC Version (system):          1.25f4
      Serial Number (system):          CK******XYL
      Hardware UUID: *****
    ATI Radeon HD 5770: (Previously ATI Radeon HD 2600 XT)
      Chipset Model:          ATI Radeon HD 5770
      Type:          Display
      Bus:          PCIe
      Slot:          Slot-1
      PCIe Lane Width:          x16
      VRAM (Total):          1024 MB
      Vendor:          ATI (0x1002)
      Device ID:          0x68b8
      Revision ID:          0x0000
      ROM Revision:          113-C0160C-155
      EFI Driver Version:          01.00.436
      Displays:
    Display:
      Resolution:          1920 x 1200
      Depth:          32-Bit Color
      Core Image:          Software
      Main Display:          Yes
      Mirror:          Off
      Online:          Yes
      Quartz Extreme:          Not Supported
    Display Connector:
    Display Connector:
    <Edited By Host>

    Not everyone updates their hardware porfile but it should have been spotted that yours lists 10.5.8 which was a big clue and reason to ask and check what you are runnning.
    Apple sells 10.6.3. Unlike the prior two which did come out with 10.X.6 which would work and allow boot from DVD you may need the 10.6.8 on flash memory that comes with Lion except that is $69.
    We usually do but get tired now that we've been saying "ATI 5x70 needs 10.6.5 or later" when people upgraded their graphic card like you did.
    I wish that wasn't so. I don't know how ATI does it for Windows but they do have to retool their drivers when a new OS comes out but end up with a package that supports more than one OS version.

  • Need help with updateing a JTree

    I have a JList, and JTree which mimic each other. User makes selection in list presses OK and in the JTree I need the node that matches their selection to update and have child nodes under it. Can't seem to get it working right.
    right now I have this:
    Logic Trail
      item one
      item two
      item three
      item four
    after update I need this
    Logic Trail
      item one
         testing
      item two
      item three
      item four
    // in the GUI
    // pass the selected int to the method in class TreePanel
    treePanel.updateTree( questionList.getSelectedIndex());
    // here is the TreePanel class
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.tree.DefaultTreeModel;
    import javax.swing.tree.DefaultMutableTreeNode;
    public class TreePanel extends javax.swing.JPanel {
      private String[] questions;
      DefaultTreeModel treeModel;
      DefaultMutableTreeNode root;
        public TreePanel(String[] questions) {
        this.questions = questions;
        root = new DefaultMutableTreeNode("Logic Trail");
        treeModel = new DefaultTreeModel(root);
        initComponents ();
      private void initComponents () {
      jScrollPane1 = new javax.swing.JScrollPane ();
      logicTree = new JTree(treeModel);
      setLayout (new java.awt.BorderLayout ());
        jScrollPane1.setViewportView (logicTree);
      add (jScrollPane1, java.awt.BorderLayout.CENTER);
    // method to update JTree, when user selects accept tree will update with new logic path
    public void updateTree(int selectedNode){
      DefaultMutableTreeNode newNode = new DefaultMutableTreeNode( treeModel.getChild(root, selectedNode));
      logicTree.setSelectionRow(selectedNode);
      DefaultMutableTreeNode logicNode = new DefaultMutableTreeNode( logicTree.getSelectionPath() );
      DefaultMutableTreeNode testNode = new DefaultMutableTreeNode(" testing" );
      treeModel.insertNodeInto(testNode, logicNode, 0);
      treeModel.reload();
    public void createTree(){
      for( int i = 0; i < questions.length; i++ ){
      DefaultMutableTreeNode questionNode = new DefaultMutableTreeNode( questions[i] );
      treeModel.insertNodeInto(questionNode, root, i );
    treeModel.reload();
    // Variables declaration - do not modify
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTree logicTree;
    // End of variables declaration
    }

    Thanks for nothing

Maybe you are looking for