How to make code work for previous versions

Hello, i have written the code below using swing 1.4. I was wondering if anyone could help me by letting me know what to convert so i run run this on a machine with a lower java runtime (ie 1.22)
What i am trying to do is have a tree with a list of files, and when u click on a node, the tree will expand, and send the node name accross to another frame. Help is most appreciated. Thanks
import java.awt.*;
import javax.swing.*;
import javax.swing.tree.*;
import javax.swing.event.TreeSelectionListener;
import javax.swing.event.TreeSelectionEvent;
import java.net.*;
import java.applet.AppletContext;
import java.util.Enumeration;
public class SimpleTree extends JApplet  {
JTree tree = new JTree();
  public void init() {
   new SimpleTree();
  public SimpleTree() {
/*try {
      UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    } catch(Exception e) {
      System.out.println("Error setting native LAF: " + e);
    Container content = getContentPane();
    Object[] hierarchy =
      {"WebSphere MQ",
        new Object[] { "400","400 Pstuff.htm",
     "400 PStuff.htm",
     "A406 - Pstfdfs.htm"}}
    DefaultMutableTreeNode root = processHierarchy(hierarchy);
    tree = new JTree(root);
    tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
    tree.addTreeSelectionListener(new TreeSelectionListener() {
    public void valueChanged(TreeSelectionEvent e) {
         DefaultMutableTreeNode node = (DefaultMutableTreeNode)
         tree.getLastSelectedPathComponent();
         String stringname = tree.getLastSelectedPathComponent().toString();
         if (node == null) return;
         if (node.isLeaf()) {
            try {
                       getAppletContext().showDocument(new URL("http://mql3service.hursley.ibm.com/process/"+stringname), "viewer");
              }catch(Exception f) {System.out.println("" + f); }   
    content.add(new JScrollPane(tree), BorderLayout.CENTER);
    setSize(500, 700);
    setVisible(true);
  public DefaultMutableTreeNode processHierarchy(Object[] hierarchy) {
    DefaultMutableTreeNode node =
      new DefaultMutableTreeNode(hierarchy[0]);
    DefaultMutableTreeNode child;
    for(int i=1; i<hierarchy.length; i++) {
      Object nodeSpecifier = hierarchy;
if (nodeSpecifier instanceof Object[]) // Ie node with children
child = processHierarchy((Object[])nodeSpecifier);
else
child = new DefaultMutableTreeNode(nodeSpecifier); // Ie Leaf
node.add(child);
return(node);
public void Rupz(String random)
TreePath path = null;
TreeNode [] treenode = null ;      
String strNode = random;
DefaultMutableTreeNode root = (DefaultMutableTreeNode)tree.getModel().getRoot();
Enumeration e = root.breadthFirstEnumeration();
while(e.hasMoreElements())
DefaultMutableTreeNode dftTmp = (DefaultMutableTreeNode)e.nextElement();
if(dftTmp.toString().equals(strNode))
     treenode = dftTmp.getPath();
     path = new TreePath(treenode) ;
try {
getAppletContext().showDocument(new URL("http://mql3service.hursley.ibm.com/process/"+strNode), "viewer");
     }catch(Exception f) {
     System.out.println("" + f);           
if(path != null)
     tree.setSelectionPath(path);
repaint();
public static void main(String [] args) {
JFrame f = new JFrame("") ;
Container contentPane = f.getContentPane();
contentPane.setLayout(new FlowLayout());
SimpleTree ta = new SimpleTree() ;
ta.init() ;
f.addWindowListener(new ExitListener());
f.setSize(500,700);
contentPane.add(ta,BorderLayout.CENTER);
f.setVisible(true) ;

hi!
you can get lead selection in the action handler then inset your code for currentContextElement.
wdContext.currentContextElement().getTableSorter().sort(wdEvent, wdContext.nodeXXX());
thanks
vishal

Similar Messages

  • How to make tablesorter work for GroupedColumns??

    Hi all,
    I imported the class of TableSorter.java to my project. It automatically picks up my normal columns, they all can be sorted.
    but the groupedColumns generated by the drag and drop table node into the design area wont pick up, even i set the property of "onAction" of the column to "Sort"(method) it wont sort the content for me.
    how to make it work?
    thanks

    hi!
    you can get lead selection in the action handler then inset your code for currentContextElement.
    wdContext.currentContextElement().getTableSorter().sort(wdEvent, wdContext.nodeXXX());
    thanks
    vishal

  • How to make setEditable() work for Applet

    I have a program using a flag to make it work both
    in JFrame and JApplet. I have a couple of JTextField
    variables and I use setEditable() to set their attributes.
    When I run it under JFframe, I have no problem to
    edit these JTextField within panels. But when running under
    appletviewer, I can not edit them at all. What could be
    wrong? Thank you.

    You must have added some more code...if you want my help, post the new code or a link to the new code and I or some other ppl can see what might have gone wrong.
    V.V.

  • How to make ProgressBar work for long process with finally download action

    Hi ADF-Experts,
    i wonder if there is a adf-solution to this use case.
    In my case the user clicks a context-menu item to get a report. So a background process will be started to generate the report(in pdf format) and when the generation is finished,
    the user can choose to download the report in the browser built-in popup.
    This all works, but because the generation process could take a long time, i want now to showing a progess bar in clock form with af:progressIndicator to inform the user about the running process.
    public void clickGenerateMenuItem(event) {
    startProgressBar();
    generateReport();
    private void generateReport() {
    doGeneration();
    stopProgressBar();
    downloadReport();
    The problem is that the ProgressBar will never be shown bacause of the call of generateReport()-methode. It is impossible in one request to make two different event (one for download and another for popup show/hide).
    I also tried with af:poll together with af:progressIndicator, the ProgressBar is indeed shown but because of the native Ajax-Poll Request the generated Report can not be downloaded more.
    Any idea how this problem could be answered?
    Thanks in advance.
    Regards
    Peng

    Hi,
    no, you can't make to calls. But you could show an animated gif instead. Have a look at sample 027 on http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html
    Frank

  • I have a application build in labview 8.5 for Windows XP using NI Visa functions to interact with hardware , how to make is work in Windows 7 32 bit and Win 7 64 bit

    I have a application build in Labview 8.5 which wroks fine with Windows XP , this program uses basic read /write functions of NI Visa to communicate with Hardware . This application doesnt work with Windows 7 32 bit/64 and Vista . What changes i need to do to make it work for the said operating system

    srinivas wrote:
    Sorry for confusion ,
    My question is what changes i need to do in code or while making the installer to make the existing program work with other Windows operating system
    You need to make sure the machine have the corresponding NI-VISA installed. Check in the NI software pages for the right version.
    Also make sure that the com port's can be selected when you first start the application. Eg. if you refer to VISA "COM1" on the XP machine It might be "COM2" on the Win7 machine.
    Br,
    /Roger

  • Norton password manager does not work on 8. How do I return to a previous version?

    when I updated to firefox 8, Norton password manager does not work. How can I return to a previous version. I am surprised that you introduced an update missing this.

    Norton needs to be updated.
    http://community.norton.com/t5/Norton-360/Firefox-8-Support-for-Norton-Toolbar/td-p/581640

  • How do I continue to save for previous version?

    Hello. I am currently using LabView 9.0 32-bit, Windows 7. Unfortunately, my university uses Labview 8.6.1 32-bit, Windows Vista Business. First, I tried to open my VI's which I started at the University and modified on my machine back on a university machine. I received an error stating that the files were saved with a newer version of LabView and could not be opened. I went home, and opened the VI's again and used File > Save for Previous Version. This is okay, except it forces me to create a new destination folder. When I close LabView and open the VI's from this destination folder, they open up automatically with an asterisk to indicate the files have changed and require saving. Obviously this is automatically converting my 8.6 files to 9.0. This is very frustrating.
    How can I force LabView to stick with the version that the files were created or saved as? If I attempt to save the "asterisked" files for previous version, it refuses to let me. Thank you for your time and consideration.

    You must be doing something wrong, or perhaps Windows 7 is interfering. Here's the step-by-step process:
    Launch LabVIEW 2009.
    Open an 8.6 VI. It should show up with an asterisk in the title bar.
    Make some changes.
    Select File -> Save for Previous Version.
    Verify that "8.6" is selected in the dropdown.
    Click "Save...".
    In the dialog click the "Save" button to accept the default of saving the VI into a new folder called "<VI Name> Folder".
    Close the VI. When asked if you want to save changes click "Don't Save".
    Check the timestamp on the newly created file in that folder.
    Open the same 8.6 VI again.
    Make some changes. 
    Select File -> Save for Previous Version.
    Verify that "8.6" is selected in the dropdown.
    Click "Save...".
    The "File name" textbox should have the same default name as previously. If you click "Save" Windows should move you into that folder, and the save dialog should remain open. The file listing should contain the VI.
    Click on the "Current Folder" button. You should get a dialog warning you that the operation will save over existing files. Click "OK" to continue. The VI will be saved as the previous version over the previous save that was done. To verify this, check the timestamp on the file.
    I just did the above on LV2009 running under XP just so I could get the button names correct.
    You can repeat steps 10-16 as many times as you want without needing to create a new folder.

  • How To Build exe for Previous Versions

    I'm new to LabView and still struggilng a little with all the files associated with a project, so I'm sure this is a simple question.
    I'm running LabView v10 for development, but wish to create an exe that can run on a v8.5 runtime version. I've seen the threads that suggest that this is as simple as 'Save For Previous Version'... but for some reason I cannot seem to make this work. I have tried saving the vi for 8.5, then choosing to build the exe, but upon being prompted to create an associated project, I'm told there are unsaved changes - that the subvi's have been converted to version 10. I've tried declining the changes and opting to use those in memory, but this also doesn't work; the built exe then gives me a runtime error, complaining it does not have LV Runtime 10.
    I've tried saving the project with 'Save for Previous Version', then building. Again, this doesn't work - even though when i open, then immediately close either the project or it's contained vi's, I'm told there are unsaved changes where it has been converted to LV10 - implying the saved files were indeed saved in LV8.5 format.
    I seem to be going round in circles here. Would someone mind laying out the necessary steps to build an exe that can run on a previous runtime environment?
    Thanks in advance
    Solved!
    Go to Solution.

    To my knowledge, none of NI's device drivers can have multiple versions co-existing.  Now, that doesn't necessarily mean if you use any hardware that you will run into problems.  If the hardware is NI hardware, then they will also have specific drivers which can be in conflict, but if they are another manufacturer, it'll come down to NI-VISA probably.  If you are using any NI data acquisiton cards, then you have DAQmx installed.
    As long as your program doesn't access these devices, you are OK.  You are not required to update the drivers if you don't use the hardware.  You need to look in the relase notes for each of the drivers you need to update and see if you can find a version that supports both 8.5 and LV2010.
    Even if you do this, it is not a 100% guarantee that you won't have problems.  I had written an application for a customer once that used NI-RFSA.  I had a control on the front panel based on a typedef in the driver.  I updated my laptop for a new project, but later had to come back and make an update for the original project.  The typedef had changed and caused a recompile.  Nothing broke on my end.  When I sent the update, it crashed on the customer PC because of the typedef change.  I ended up getting them to upgrade the driver on their machine.

  • TS2634 I bought a composite AV cable with 30 pin connector at a proper apple store for my ipad 2 which no longer works now i have updated to ios7 - please advise how to make this work ?

    I bought a composite AV cable with 30 pin connector at a proper apple store for my ipad 2 which no longer works now i have updated to ios7 - please advise how to make this work ?

    I have the same problem.
    Two similar discussions:
    https://discussions.apple.com/message/23081658#23081658
    https://discussions.apple.com/message/23281391#23281391
    I have not yet seen any official response to the question: "Is the Apple AV Composite cable fully supported with 30pin connector devices upgraded with iOS7 - specifically ? - eg. iPad 2, iPhone 4, iPhone 4s"
    If it is not currently supported is that then due to a bug / oversight and in that case is it something that will be fixed in the near future?
    Please let us know what feedback you got from asking Apple support.

  • I cannot connect a Sony ILCE6000 camera for wireless downloading. Sony feels I need DLNE? They do not know how to make it work. Can anyone help OS10·9·5

    I cannot connect a Sony ILCE6000 camera for wireless downloading. Sony feels I need DLNE? They do not know how to make it work. Can anyone help OS10·9·5

    I cannot use the software.. so you need to figure out where the problem is..
    But let me suggest.. the Mac is not the issue and likely the info from Sony is also up the creek.. they make PC's after all.
    It is far more likely the camera is having issues with the wireless network.
    Do you know you have a connection to the home network on the camera.. ?? You have an IP address and some internet or local access at least?
    How you will discover those things is by fiddling.. but if you can tell me what wireless AP you are using that will help.

  • Labview 7.1 crashes windows XP when using VI's saved with the 'Save for Previous Version' option available in Labview 8

    I am trying to work with a series of vi's developed in Labview 8 in Labview 7.1.  The code was saved with the 'Save for Previous Version' option available in Labview 8.  When trying to use the code in LV7.1 my entire Windows XP system locks up (cursor freezes).  Are there any ideas what's going on and how to fix this?
    Thanks for your help!
    Mike

    I have seen some problems with the save for previous option in the past. Instead of saving the entire hierarchy, try seperating the code into several different pieces and saving each piece individually. Then, see if you can open the different pieces in 7.1.
    If that doesn't help, you should post some more details, like when exactly does it lock up, does it have things like DLL calls, and maybe attach the code.
    Try to take over the world!

  • Save for previous version (8.6 to 8.5) including dependencies

    Hello everyone,
    Once again please forgive me if I use the wrong terminology as I am very new to Labview.
    Here is what I am trying to do. I have a project written in Labview 8.6. It has a number of files and some dependencies (which include .lvlib's .lvlclass's and some .vi's). I need to save this project as a previous version (8.5) and send it downstairs to the lab. I've tried to save it as a previous version using the the project explorer: file->save for previous version. When I zip up the project folder and send it to the lab and try and run it on 8.5 it says there are missing files. Specifically:
    NI_report.lvclass
    NI_reportGenerationCore.lvlib
    NI_HTML.lvclass
    NI_StandardReport.lvclass
    I am not creating an executable as they need to be able to make some minor changes to the code. Both computers have the full Labview development suite. Also there is no chance that the lab can simply upgrade to 8.6 from 8.5 as these upgrades are scheduled by another department.
    Is there any way to save this project so that it includes the dependencies that are missing in the project folder? I'm sure there must be a simple solution but I can't seem to get it to work.
    As always any suggestions or advice is greatly appreciated. Please let me know if there is any more information I can provide. Also please feel free to tell me what I'm doing wrong as I'm keen to understand why what I'm trying to do isn't working.
    Cheers,
    Alex
    Alexander H. | Software Developer | CLAD

    Yes the toolkit is installed on the computer in the lab. I was able previously able to work on this project on either computer and only had problems once the upstairs computer was upgraded to Labview 8.6.
    Alexander H. | Software Developer | CLAD

  • The Norton Toolbar 4.6 is disabled in Firefox 4 while it is working in previous version of Firefox. In Firefox 4 it opens with massage Norton Toolbar is incompatible in firefox 4. Is this problem have any solution?? pls tell me.

    The Norton Toolbar 4.6 is disabled in Firefox 4 while it is working in previous version of Firefox. In Firefox 4 it opens with massage Norton Toolbar is incompatible in firefox 4. Is this problem have any solution?? pls tell me.

    Symantec need to update their Firefox add-ons so that they are compatible with Firefox 4. They have released an update for Norton 360 to make it compatible with Firefox 4, for details see http://us.norton.com/support/kb/web_view.jsp?wv_type=public_web&docurl=20100720113635EN&ln=en_US
    I do not know about other Norton products, but if you run Norton LiveUpdate it should inform you if there are updates available. If no updates are available, you can downgrade to Firefox 3.6 if you want to use the Norton add-ons.
    To downgrade to Firefox 3.6 first uninstall Firefox 4, but do not select the option to "Remove my Firefox personal data". If you select that option it will delete your bookmarks, passwords and other user data.
    You can then install the latest version of Firefox 3.6 available from http://www.mozilla.com/en-US/firefox/all-older.html - it will automatically use your current bookmarks, passwords etc.
    To avoid possible problems with downgrading, I recommend going to your profile folder and deleting the following files if they exist - extensions.cache, extensions.rdf, extensions.ini, extensions.sqlite and localstore.rdf. Deleting these files will force Firefox to rebuild the list of installed extensions, checking their compatibility, and reset toolbar customizations.
    For details of how to find your profile folder see https://support.mozilla.com/kb/Profiles

  • How Do Mobile Codes Work? FAQ

    You may have seen them in our weekly ads, on BestBuy.com, or on signs in our retail stores: two-dimensional images that look similar to traditional bar codes, but are irregular and often square. Ever wonder what they are? They’re Mobile Codes!
    What is a Mobile Code?
    A Mobile Code is any two-dimensional (DataMatrix or QR code) or linear bar code (UPC) which can be read by a smart phone, linking the physical world with the on-line world. Some bar code symbologies are in the public domain, such as UPC and DataMatrix and some symbologies are proprietary (e.g. Microsoft’s Tag and EZ codes).  Bar Code scanners today are “image scanners,” and since most smart phones have cameras built into them, we can now use them as personal bar code scanners!
    Do I need software to read a Mobile Code?
    Yes. The Best Buy Mobile App is free software you can download to your phone that contains a bar code reader. The reader will scan UPC and QR codes for products carried by Best Buy. To download the reader, simply follow these instructions:
    1)      Text “APP” to 332211.
    2)      Click on the link that is returned
    3)      Download and install the Best Buy Mobile App on your phone
    4)      Launch the app, push the Product Scan button, and hover the phone over the code.
    Try this one: 
    You can also download the app through several platform-specific app stores:
             iPhone via Apple App Store
             Android Phone via Google Play
             Windows Phone and Touch Screen PC via Windows Phone Store
    Additional app features can be found on http://www.BestBuy.com/App.
    What phones are supported?
    The Best Buy Mobile App is available on most iPhone, Android, and Windows Mobile devices. It is also available for Touch Screen PCs. iPad version coming soon!
    What service plans will I need?
    The service relies on a data plan from your provider or the free Wi-Fi network available in each of our retail stores. The amount of bandwidth consumed varies based on the product experience rendered. If you do not have an unlimited data plan, please plan accordingly. Remember, watching videos can use more bandwidth than viewing mobile web pages.
    What type of bar codes can I scan with the Best Buy Mobile App?
    The Best Buy Mobile App reads QR (Quick Response) Codes, which are the square two-dimensional bar codes with the three smaller squares in the upper right and left of the bar code and in the lower left.   The Best Buy Mobile App can also read UPC codes (the codes used at cash registers in stores). The app does not currently read Data Matrix codes which are square two-dimensional codes, but they don’t have the three smaller squares in them.
    What will happen when I scan the Mobile Code?
    After reading a Best Buy Mobile Code, you will be taken to a mobile web page that contains item specific information. You can use the Best Buy Mobile App to compare a number of products or narrow your selection of items based on parameters you select while in the store.
    Is there any personal information involved?
    No personal information is obtained from your phone. If you have the Best Buy Mobile App and have logged in, your My Best Buy membership information may be used to create a personalized experience.
    How do mobile codes work?
    The Best Buy Mobile App includes the software required to turn your phone into a scanner. All you need to do is initiate the scanner and hover the phone over the code. The app scans the code and launches the corresponding experience. It’s the best of both worlds: you can be online and in the store at the same time!
    How do I save the data for use later?
    On the iPhone and Android, add the product to your cart. Products added to your cart are available until removed. A list of recently viewed products can also be accessed through the main app menu.
    What prices will I see on my mobile device?
    You will see our regular BestBuy.com prices.  In some cases they may vary from the in-store price.

    If you touch the left side of the telephone number field, you get a drop down Label from which you can select the type of number it is to be.

  • How to make buttons work in Interactive Adobe Forms

    Hi Experts,
    I am new to interactive form. Though i have worked in normal/non-Interactive form, i do not know how to make buttons work in interactive adobe forms using ABAP  (I don't know JAVA). Can any one help me out and walk me through to how to code in ABAP to make buttons work.
    Kind Regards,
    Sharat.

    Please refer to my earlier post ... You will get an idea
    Please refer to the below thread for detail solution
    Sample Interactive form example ?....urgent...
    Cheers
    Satya

Maybe you are looking for

  • Can not capture under Win7

    If you find that capturing is no longer possible under Win7, you may take this step to remedy the situation. Try changing your firewire driver. There's 3 drivers bundled in windows 7, change the driver to the one that has (Legacy) at the end of the n

  • Validating the Business Rule  Essbase Error(1200315):

    When i Execute the BR FIX([v_Year],[v_Scenario],"Working", "USD","EUR", "HSP_InputValue",@LEVMBRS("Datasource", 0)) /* @ANCESTORS ("Products"); @IDESCENDANTS ("Entities");*/ AGG ("Products","Entities"); ENDFIX; It is Successful. But when i Change the

  • Bookmark menu: can´t delete entrys, same folders are ten times, after deleting restore itsself.....

    in LESEZEICHEN-SYMBOLS I keep my bookmarks but in LESEZEICHEN-MENÜ there are hundreds of doublets of this bookmarks, after deleting they restore istself.... thanks bjh

  • Injected @EJB not working correctly???

    I developed a simple J2EE Project using Netbeans 5.5. I have the following EJB's: - ShoppingCartBean.java (Stateful Session Bean) - ShoppingCartLocal.java - Product.java (Entity Bean) - ProductFacade.java - ProductFacadeLocal.java The ShoppingCartBea

  • Change of image in web reports (MIME repository : SE80)

    Hello, i want to replace company logo in web reports. i have changed the logo (image) through MIME repository in SE80 transaction, but i am unable to see the unchanged logo on portal/web reports. What can be the issue. Is there any setting anywhere t