Minor JFileChooser/FileFilter query.

Ok.
I've made my own FileFilter. I've integrated this FileFilter with the JFileChooser (using fc.setFileFilter).
Now, uhm.. so now my JFileChooser's file type drop-down list has 2 entries: "All files" and "MLP files".
You see now, "MLP files" shows only those files with the extension ".mlp". Is there a way I can show the directories also with the "MLP files" FileFilter?
Also, is there a way to completely remove the "All files" filefilter, which is the default file filter.

You can display files and directories using the public static final int FILES_AND_DIRECTORIES
see this link
http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JFileChooser.html#FILES_AND_DIRECTORIES
but the functionality will display all directories, but only the file extensions that you set in the filter will be shown in the directory......
http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JFileChooser.html
http://java.sun.com/docs/books/tutorial/uiswing/components/filechooser.html

Similar Messages

  • Active FileFilter in JFileChooser

    Ok, here is my problem:
    I successfully installed 2 TextFilters to my JFileChooser. But unfortunately when i open the JFileChooser Window only the last added FileFilter is active...But i want to start this window with the common file filter (*.*). So how can i set the active FileFilter from beginning?
    here is my Code:
                            fileChooser = new JFileChooser();
                   FileView fv = new ImageFileView();
                   fileChooser.setFileView(fv);
                   fileChooser.setFileFilter(new MyFileFilter(".pdf","Adobe Acrobat files (*.pdf)"));
                   fileChooser.setFileFilter(new MyFileFilter(".rtf","Rich Text Format files (*.rtf)"));
                   fileChooser.showOpenDialog(this);

    i know how to add fileFilter to my JFileChooser...and
    i read the FM!I figured this out in 2 minutes. Was this really so hard?
    private static void JFileChooserTest() {
              JFileChooser chooser = new JFileChooser();
              FileFilter o_filter = chooser.getFileFilter();
              FileExtensionFilter filter = new FileExtensionFilter.HTMLFilter();
              FileExtensionFilter filter2 = new FileExtensionFilter.RTFFilter();
              FileExtensionFilter filter3 = new FileExtensionFilter.TextFilter();
              chooser.addChoosableFileFilter(filter);
              chooser.addChoosableFileFilter(filter2);
              chooser.addChoosableFileFilter(filter3);
              chooser.setFileFilter(o_filter);
              chooser.showOpenDialog(null);
         }

  • Best Practice for BEX Query "PUBLISH to ROLE"?

    Hello.
    We are trying to determine the best practice for publishing BEX queries/views/workbooks to ROLEs. 
    To be clear of the process I am referring: from the BEX Query Designer, there is an option QUERY>PUBLISH>TO ROLE.  This function updates the user menu of the selected security role with essentially a shortcut to the BEX query.  It is also possible to save VIEWS/WORKBOOKS to a role from the BEX Analyzer menu.  We have found ROLE menus to be a good way to organize BEX queries/views/workbooks for our users. 
    Our dilemma is whether to publish to the role in our DEV system and transport to PROD,... or if it is ok to publish to the role directly in the PROD system.
    Publishing in DEV is not always possible, as we have objects in PROD that do not exist in DEV. For example, we allow power users to create queries directly in PROD.  We also allow VIEWS and WORKBOOKS to be created directly in PROD.  It would not be possible to publish types of objects in DEV. 
    Publishing in PROD eliminates the issues above, but causes concerns for our SECURITY team.  We would be able to maintain these special roles directly in PROD.
    Would appreciate any ideas, suggestions, examples of how others are handling this BEX publish-to-role process.
    Thank you.
    -Joel

    Hi Joel,
    Again as per the Best Practices.Nothing to be created in PRD,even if we create them in PRD for Power users its assumed as temprory and can be deleted at any time.
    So if there are already deviations then you can go for deviations in this case as well but it wont be the Best Practice.Also in few cases we have workbooks created in PRD as they cud nt be created in DEV due to various reasons...in such cases we did not think of Best Practice ,we had a raised an OSS on this aswell.
    In our Project,we have done everything in DEV and transported to PRD,in case there were any very Minor changes at query level we have done in PRD and immedialtely replicated the same in DEV so that they are in SYNC.
    rgds
    SVU

  • Loading XML Document from JFileChooser

    My initial version of this app I hardcoded the XML filename. Now, I would like to load an xml file via a JFileChooser. The problem I'm having is that I create the DOM Document in the constructor because of dependencies on the JTree. Well, I don't call showDialog until the "open" action is called which is further into the program. By then it's too late. Here is the code. I extracted some unecessary code for reading purposes.
    public class DomGui extends JPanel implements DomGuiConstants, ActionListener
        private JScrollPane treeView;
        private String xmlFilename;
        private Document document;
        private JFileChooser fileChooser;
        private ExtensionFilter fileFilter;
        private static JFrame frame;
        private static JTree jtree;
        public DomGui() throws Exception
            frame = new JFrame(DOM_VIEWER);
            fileChooser = new JFileChooser();
            fileFilter = new ExtensionFilter(XML_EXTENSION, XML_DESCRIPTION);
            // Create the Document
            //xmlFilename = "W:/RoseModel/ImplementationView/seng/ewcs/clwc/Simulation/Utilities/Xml/DomViewer/TVschedule.xml";
            try
                CreateDomDocument createDomDocument = new CreateDomDocument(xmlFilename);
                document = createDomDocument.getDocument();
            catch (FileNotFoundException fnfe)
                System.out.println(fnfe);
                System.exit(1);
            // Create a Tree Model
            DomTreeModel model = new DomTreeModel(document);
            // Create a renderer
            DomTreeCellRenderer  treeCellRenderer = new DomTreeCellRenderer();
            // Create the JTree
            jtree = new JTree(model);
            // Create an Editor
            DomTreeCellEditor treeCellEditor = new DomTreeCellEditor(jtree);
            // Build left-side view
            // an empty tree and put it a JScrollPane so users can see
            // its contents as it gets large
            treeView = new JScrollPane(jtree);
            treeView.getViewport().add(jtree);
            treeView.setPreferredSize(new Dimension( leftWidth, windowHeight ));
            // Create a JSplitPane to hold the left side JTree
            // and the right side JEditorPane
            // Build split-pane view
            splitPane = new JSplitPane( JSplitPane.HORIZONTAL_SPLIT,
                                                       treeView,
                                                       htmlView );
            splitPane.setContinuousLayout( true );
            splitPane.setDividerLocation( leftWidth );
            splitPane.setPreferredSize(new Dimension
                                                        ( windowWidth + 10, windowHeight+10 ));
            // Add GUI components
            this.setLayout(new BorderLayout());
            this.add("Center", splitPane );
        public static void makeFrame()
            int FRAME_WIDTH = 670;
            int FRAME_HEIGHT = 600;
            // Set up the tree, the views, and display it all
            try
                final DomGui guiPanel = new DomGui();
                frame.getContentPane().add("Center", guiPanel );
            catch (Throwable throwable)
                throwable.printStackTrace();
                System.exit(1);
        public void actionPerformed(ActionEvent actionEvent)
            String actionCommand = actionEvent.getActionCommand();
            System.out.println("Action: " + actionCommand);
            if (actionCommand.equalsIgnoreCase("Quit"))
                System.exit(0);
            else if (actionCommand.equalsIgnoreCase("Open"))
                showDialog("Open XML File",
                                 "Open",
                                 "Open the file",
                                 'o',
                                 null);
        // end actionPerformed
        public File showDialog (String dialogTitle,
                                            String approveButtonText,
                                            String approveButtonToolTip,
                                            char approveButtonMnemonic,
                                            File file)
            fileChooser.setDialogTitle(dialogTitle);
            fileChooser.setApproveButtonText(approveButtonText);
            fileChooser.setApproveButtonToolTipText(approveButtonToolTip);
            fileChooser.setApproveButtonMnemonic(approveButtonMnemonic);
            fileChooser.setFileSelectionMode(fileChooser.FILES_ONLY);
            fileChooser.rescanCurrentDirectory();
            fileChooser.setSelectedFile(file);
            fileChooser.addChoosableFileFilter(fileFilter);
            fileChooser.setFileFilter(fileFilter);
            int result = fileChooser.showDialog(this, null);
            System.out.println("Result is: " +result);
            if (result == fileChooser.APPROVE_OPTION)
                System.out.println("I'm Here 1");
                System.out.println("File selected: " + fileChooser.getSelectedFile());
                xmlFilename = fileChooser.getSelectedFile().toString();
                return fileChooser.getSelectedFile();
            else
                System.out.println("I'm Here 2");
                return null;
        // end showDialog
    [\code]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    In your actionPerformed() method, shouldn't you do something with the File returned by showDialog()? For instance:
            else if (actionCommand.equalsIgnoreCase("Open"))
                xmlFilename = showDialog("Open XML File",
                                 "Open",
                                "Open the file",
                                'o',
                                 null).getName();
            }Because it seems that, for now at least, you're choosing a file and then just kinda throwing it away...

  • NullPointerException in JFileChooser.showOpenDialog() JRE 1.7

    Hi all,
    In my application, i have used JFileChooser to select a file. When i try to open JFileChooser.showOpenDialog() it throws the following exception. Not sure where i am wrong. Please help me.
    Exception:
    #Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    # at sun.awt.shell.Win32ShellFolder2.access$200(Unknown Source)
    # at sun.awt.shell.Win32ShellFolder2$1.call(Unknown Source)
    # at sun.awt.shell.Win32ShellFolder2$1.call(Unknown Source)
    # at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    # at java.util.concurrent.FutureTask.run(Unknown Source)
    # at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    # at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    # at sun.awt.shell.Win32ShellFolderManager2$ComInvoker$3.run(Unknown Source)
    # at java.lang.Thread.run(Unknown Source)
    Source Code:
         public File browseFile() {
              UIManager.put("FileChooser.readOnly", Boolean.TRUE);
              if (DEBUG > 4) {
                   System.out.println("Initial Dir : " + initialDir);
                   System.out.println("Title : " + title);
              JFileChooser jfc = new JFileChooser();
              FileFilter filter = null;
              if (null != extension && extension.trim().length() > 0) {
                   if (null != description && description.trim().length() > 0) {
                        filter = new ExtensionFilter(this.description, this.extension);
                   } else {
                        filter = new ExtensionFilter(this.extension, this.extension);
                   jfc.setFileFilter(filter);
              if (null != title && title.trim().length() > 0) {
                   jfc.setDialogTitle(title);
              if (null != initialDir) {
                   jfc.setCurrentDirectory(new File(initialDir));
              int returnVal = - 1;
              if (type == JFileChooser.OPEN_DIALOG) {
                   returnVal = jfc.showOpenDialog(this);
              } else if (type == JFileChooser.SAVE_DIALOG) {
                   returnVal = jfc.showSaveDialog(this);
              if (returnVal == JFileChooser.APPROVE_OPTION) {
                   File file = jfc.getSelectedFile();
                   setVisible(false);
                   return file;
              } else {
                   setVisible(false);
                   return null;
    Thanks for all in Advance.
    /dhavan

    Sorry, actually i commented that line. Here is the updated code.
         public File browseFile() {
              parent = this;
              UIManager.put("FileChooser.readOnly", Boolean.TRUE);
    //          if (DEBUG > 4) {
                   System.out.println("Initial Dir : " + initialDir);
                   System.out.println("Initial File : " + initialFile);
                   System.out.println("Title : " + title);
              try {
                   EventQueue.invokeLater( new Runnable() {
                        public void run() {
                             jfc = new JFileChooser();
                             FileFilter filter = null;
                             if (null != extension && extension.trim().length() > 0) {
                                  if (null != description && description.trim().length() > 0) {
                                       filter = new ExtensionFilter(description, extension);
                                  } else {
                                       filter = new ExtensionFilter(extension, extension);
                                  jfc.setFileFilter(filter);
                             if (null != title && title.trim().length() > 0) {
                                  jfc.setDialogTitle(title);
                             if (null != initialDir) {
                                  jfc.setCurrentDirectory(new File(initialDir));
                        if (type == JFileChooser.OPEN_DIALOG) {
                             System.out.println("JFileChooser.OPEN_DIALOG");
                             returnVal = jfc.showOpenDialog(parent);
                        } else if (type == JFileChooser.SAVE_DIALOG) {
                             System.out.println("JFileChooser.SAVE_DIALOG");
                             returnVal = jfc.showSaveDialog(parent);
              } catch (Exception ex) {
                   ex.printStackTrace();
              return null;
              if (returnVal == JFileChooser.APPROVE_OPTION) {
                   File file = jfc.getSelectedFile();
                   return file;
              } else {
                   return null;
         }Exception:-
    #Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    #     at sun.awt.shell.Win32ShellFolderManager2.createShellFolder(Unknown Source)
    #     at sun.awt.shell.Win32ShellFolderManager2.getRecent(Unknown Source)
    #     at sun.awt.shell.Win32ShellFolderManager2.get(Unknown Source)
    #     at sun.awt.shell.ShellFolder.get(Unknown Source)
    #     at sun.swing.WindowsPlacesBar.<init>(Unknown Source)
    #     at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.updateUseShellFolder(Unknown Source)
    #     at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installComponents(Unknown Source)
    #     at javax.swing.plaf.basic.BasicFileChooserUI.installUI(Unknown Source)
    #     at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installUI(Unknown Source)
    #     at javax.swing.JComponent.setUI(Unknown Source)
    #     at javax.swing.JFileChooser.updateUI(Unknown Source)
    #     at javax.swing.JFileChooser.setup(Unknown Source)
    #     at javax.swing.JFileChooser.<init>(Unknown Source)
    #     at javax.swing.JFileChooser.<init>(Unknown Source)
    #     at com.marimba.ncp.apps.editor.SwingFileChooser$1.run(SwingFileChooser.java:59)
    #     at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    #     at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    #     at java.awt.EventQueue.access$000(Unknown Source)
    #     at java.awt.EventQueue$1.run(Unknown Source)
    #     at java.awt.EventQueue$1.run(Unknown Source)
    #     at java.security.AccessController.doPrivileged(Native Method)
    #     at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    #     at java.awt.EventQueue.dispatchEvent(Unknown Source)
    #     at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    #     at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    #     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    #     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    #     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    #     at java.awt.EventDispatchThread.run(Unknown Source)

  • Generating a list of programs installed on a machine

    Hello,
    I am working on a project at the minute, and I need to find out, is it possible to create a list of all the programs installed on a machine using java?
    Thanks

    For what purpose one would ask.
    One can do a directory scan (File.listFiles).
    In java you can ask for the root drives (see FileSystemView, JFileChooser), and query whether they a removable/remote media.
    Then you simply need to collect all .exe files (on Windows).
    Windows uses the registry for software products. There are some native-code based APIs that give access to the registry. Or you might in RegEdit export a CURRENT_SOFTWARE tree from the registry and parse the text file..
    As you can execute command line programs in java (Runtime.exec) you can run RegEdit,
    see http://techsupt.winbatch.com/TS/T000001029F18.html for options.

  • Open a JavaScript in Google Chrome on a Mac computer

    My question is simple:
    How can I open a JavaScript file with Google Chrome on a Mac computer using Java?
    This is my code so far:
    JOptionPane.showMessageDialog(null, "Please browse to Google Chrome!");
                                JFileChooser fc = new JFileChooser();
                                FileFilter ff = new FileFilter() {
                                    public boolean accept(File pathname) {
                                        if (pathname.isDirectory()) {
                                            return true;
                                        if (pathname.getName().toLowerCase().equals("chrome.exe") || pathname.getName().toLowerCase().equals("chrome.app")) {
                                            return true;
                                        return false;
                                    @Override
                                    public String getDescription() {
                                        return "chrome.exe; chrome.app";
                                fc.setFileFilter(ff);
                                int returnVal = fc.showOpenDialog(null);
                                if (returnVal == JFileChooser.APPROVE_OPTION) {
                                    try {
                                        Runtime.getRuntime().exec("open " + fc.getSelectedFile().toURI() + " " + f.toURI());
                                    } catch (Exception exxxx) {
                                        JOptionPane.showMessageDialog(null, "Unknown exception occurred! It's: " + exxxx.toString() + "\n" + "fc.getSelectedFile().toURI()");
                                }I have little to no Mac knowledge, but this code opens Google Chrome, Safari and Finder at once...

    Okay I have figured the exact mac command needed to open a file with a custom program, however, if I use the exact same command in Java, nothing happens, Chrome doesn't open, no errors, nothing...
    I am using this code:
    try {
         Process process = Runtime.getRuntime().exec("open -a \"Google Chrome\" /Users/noskill/Desktop/1.0.user.js");
    } catch (Exception p) {
         System.out.println("Even this doesn't happen!");
    }Which is weird because whenever I use the exact same string in Mac Terminal, Google Chrome starts and loads it...
    So my question now is: How to run a Mac command in Java?
    Edited by: The_Pointer on Sep 15, 2010 2:20 PM

  • Reports with custom SQL

    Hi all,
    is there a way to find out which Webi reports are running custom SQL?
    Basically we want to find this out without opening each report in edit mode.
    Thanks.

    Hi George,
    I encounter this issue OFTEN because I add custom SQL in many queries. The problem for me, as you may have encountered yourself, is when I go in and do a minor tweak a query by adding a field, the custom SQL is flushed away.
    Since WebI doesn't show this important information on the Document List, I have made it a habit to add a note to the document properties. (Right click on the document title and select Properties.) The properties will appear directly beneath the title on the Document List.
    My Document List looks like this:
    That's the solution I came up with. It reminds me that if I open a document to modify it in any way, I need to be careful not to lose my custom SQL code.
    Good luck,
    Marvin

  • Image displayed by child window captured by parent window.

    This is a rather peculiar problem.
    My application starts with a JFrame which takes some file as an input and then open another window and plot the graph.What happens is whatever is drawn on the child window(graph) is captured by the parent window which looks quite odd.Could anyone help me out the how to solve this problem??

    sure... here are the codes......
    //parent window:
    package igib.genebrowser;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import igib.genebrowser.menu.*;
    import igib.genebrowser.plot.*;
    public class GeneBrowserMain extends JFrame
         public GeneBrowserMain()
              super("GenomeBrowser-1.0");
              Container cp = this.getContentPane();
              cp.setLayout(new BorderLayout());
              DrawFeature df = new DrawFeature();
              cp.add(df, BorderLayout.CENTER);
         public static void main(String args[])
              Point p = new Point(400,300);
              GeneBrowserMain gbm = new GeneBrowserMain();
              GeneBrowserMenu menu = new GeneBrowserMenu();
              gbm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              gbm.setSize(300,200);
              gbm.setLocation(p);
              gbm.setJMenuBar(menu);
              gbm.setResizable(false);
              gbm.setVisible(true);
    //GeneBrowserMenu file
    package igib.genebrowser.menu;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import igib.genebrowser.plot.*;
    import igib.genebrowser.menu.*;
    import igib.genebrowser.*;
    public class GeneBrowserMenu extends JMenuBar implements ActionListener
         JMenu fileMenu;
         JMenuItem open;
         JMenuItem quit;
         GeneBrowserMain gbm;
         public GeneBrowserMenu()
              this.gbm = gbm;
              fileMenu = new JMenu("File");
              this.add(fileMenu);
         open = new JMenuItem("open");
              fileMenu.add(open);
              quit = new JMenuItem("quit");
              fileMenu.add(quit);
              open.addActionListener(this);
              quit.addActionListener(this);
         public void actionPerformed(ActionEvent e)
              if(e.getSource() == open)
                   try
                             Point p = new Point(300,200);
                             FileOpenWindow f = new FileOpenWindow();
                             f.setSize(450,250);
                             f.setLocation(p);
                             f.setVisible(true);
                   catch(Exception ex)
              if(e.getSource() == quit)
                   System.exit(1);
    //FileOpenWindow which takes file as input and opens GBMainFrame and plot graphs
    package igib.genebrowser.menu;
    import javax.swing.*;
    import javax.swing.border.*;
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.colorchooser.*;
    import javax.swing.tree.*;
    import javax.swing.event.*;
    import javax.swing.filechooser.*;
    import java.io.FileWriter;
    import java.io.BufferedReader.*;
    import java.io.File;
    import igib.genebrowser.util.*;
    import igib.genebrowser.plot.*;
    import igib.genebrowser.*;
    //import java.io.*;
    public class FileOpenWindow extends JFrame implements ActionListener, ItemListener
         public JTabbedPane tPane ;
         public File seqFile, repeatFile, snpFile, geneFile;
         JLabel sequenceFile, repeatfile, snpfile, genefile, jb, winsize, shiftsize;
         JButton browse1, browse2, ok1, ok2, browse3, browse4, browse5, browse6;
         JTextField jtf1, jtf2, jtf3, jtf4, jtf5, jtf6;
         File f;
         PlotGraph pg;
         GBMainFrame gb;
         GeneBrowserMain gbm;
         JComboBox shiftSize, winSize;
         public FileOpenWindow()
              super("Open File");
              ImageIcon icon = new ImageIcon("images/middle.gif");
              Container cp = this.getContentPane();
              tPane = new JTabbedPane();
              JPanel jp1 = addNCBI();
              JPanel jp2 = addOther();
              tPane.addTab("NCBI", icon, jp1);
    tPane.setSelectedIndex(0);
              tPane.addTab("Other", icon, jp2);
    tPane.setSelectedIndex(0);
              //tPane.add(jp1);
              cp.add(tPane,BorderLayout.CENTER);
              this.setResizable(false);
         private JPanel addNCBI()
              JPanel cp = new JPanel();
              cp.setLayout(new GridLayout(8,5));
    //***********************1st row*************************************************//
              for(int i = 0; i < 5; i++)
                   jb = new JLabel(" ");
                   cp.add(jb);
    //***********************1st row*************************************************//
    //***********************2nd row*************************************************//
              for(int i = 0; i < 5; i++)
                   jb = new JLabel(" ");
                   cp.add(jb);
    //***********************2nd row*************************************************//
    //***********************3rd row*************************************************//
              jb = new JLabel(" Sequence");
              cp.add(jb);
              sequenceFile = new JLabel(" File :");
              cp.add(sequenceFile);
              browse1 = new JButton("browse");
              cp.add(browse1);
              jtf1 = new JTextField(" ");
              cp.add(jtf1);
              jb = new JLabel(" ");
              cp.add(jb);
    //***********************3rd row*************************************************//
    //***********************4th row*************************************************//
                   jb = new JLabel(" Repeat");
                   cp.add(jb);
                   repeatfile = new JLabel(" File :");
                   cp.add(repeatfile);
                   browse2 = new JButton("browse");
                   cp.add(browse2);
                   jtf2 = new JTextField(" ");
                   cp.add(jtf2);
                   jb = new JLabel(" ");
                   cp.add(jb);
    //***********************4th row*************************************************//
    //***********************5th row*************************************************//
              for(int i = 0; i < 5; i++)
                   jb = new JLabel(" ");
                   cp.add(jb);
    //***********************5th row*************************************************//
    //***********************1st row*************************************************//
                   winsize = new JLabel("Window Size: ");
                   cp.add(winsize);
                   winSize = new JComboBox();
                   winSize.addItem("100");
                   winSize.addItem("500");
                   winSize.addItem("1000");
                   winSize.addItem("5000");
                   cp.add(winSize);
                   jb = new JLabel(" ");
                   cp.add(jb);
                   shiftsize = new JLabel("Shift Size: ");
                   cp.add(shiftsize);
                   shiftSize = new JComboBox();
                   shiftSize.addItem("25");
                   shiftSize.addItem("50");
                   shiftSize.addItem("100");
                   shiftSize.addItem("500");
                   cp.add(shiftSize);
    //***********************1st row*************************************************//
    //***********************5th row*************************************************//
              for(int i = 0; i < 5; i++)
                   jb = new JLabel(" ");
                   cp.add(jb);
    //***********************5th row*************************************************//
    //***********************6th row*************************************************//
                   for(int i = 0; i < 2; i++)
                        jb = new JLabel(" ");
                        cp.add(jb);
                   ok1 = new JButton("OK");
                   cp.add(ok1);
                   for(int i = 0; i < 2; i++)
                        jb = new JLabel(" ");
                        cp.add(jb);
    //***********************6th row*************************************************//
                   browse1.addActionListener(this);
                   browse2.addActionListener(this);
                   ok1.addActionListener(this);
                   shiftSize.addItemListener(this);
                   winSize.addItemListener(this);
                   return cp;
         private JPanel addOther()
              JPanel cp = new JPanel();
              cp.setLayout(new GridLayout(9,5));
    //***********************1st row*************************************************//
              for(int i = 0; i < 5; i++)
                   jb = new JLabel(" ");
                   cp.add(jb);
    //***********************1st row*************************************************//
    //***********************2nd row*************************************************//
              jb = new JLabel(" ");
              cp.add(jb);
              sequenceFile = new JLabel("sequenceFile :");
              cp.add(sequenceFile);
              browse3 = new JButton("browse");
              cp.add(browse3);
              jtf3 = new JTextField(" ");
              cp.add(jtf3);
              jb = new JLabel(" ");
              cp.add(jb);
    //***********************2nd row*************************************************//
    //***********************3rd row*************************************************//
                   jb = new JLabel(" ");
                   cp.add(jb);
                   repeatfile = new JLabel("RepeatFile :");
                   cp.add(repeatfile);
                   browse4 = new JButton("browse");
                   cp.add(browse4);
                   jtf4 = new JTextField(" ");
                   cp.add(jtf4);
                   jb = new JLabel(" ");
                   cp.add(jb);
    //***********************3rd row*************************************************//
    //***********************4th row*************************************************//
              jb = new JLabel(" ");
              cp.add(jb);
              snpfile = new JLabel("SNP File :");
              cp.add(snpfile);
              browse5 = new JButton("browse");
              cp.add(browse5);
              jtf5 = new JTextField(" ");
              cp.add(jtf5);
              jb = new JLabel(" ");
              cp.add(jb);
    //***********************4th row*************************************************//
    //***********************5th row*************************************************//
              jb = new JLabel(" ");
              cp.add(jb);
              genefile = new JLabel("Gene File :");
              cp.add(genefile);
              browse6 = new JButton("browse");
              cp.add(browse6);
              jtf6 = new JTextField(" ");
              cp.add(jtf6);
              jb = new JLabel(" ");
              cp.add(jb);
    //***********************5th row*************************************************//
    //***********************6th row*************************************************//
              for(int i = 0; i < 5; i++)
                   jb = new JLabel(" ");
                   cp.add(jb);
    //***********************6th row*************************************************//
    //***********************1st row*************************************************//
                   winsize = new JLabel("Window Size: ");
                   cp.add(winsize);
                   winSize = new JComboBox();
                   winSize.addItem("100");
                   winSize.addItem("500");
                   winSize.addItem("1000");
                   winSize.addItem("5000");
                   cp.add(winSize);
                   jb = new JLabel(" ");
                   cp.add(jb);
                   shiftsize = new JLabel("Shift Size: ");
                   cp.add(shiftsize);
                   shiftSize = new JComboBox();
                   shiftSize.addItem("25");
                   shiftSize.addItem("50");
                   shiftSize.addItem("100");
                   shiftSize.addItem("500");
                   cp.add(shiftSize);
    //***********************1st row*************************************************//
    //***********************6th row*************************************************//
              for(int i = 0; i < 5; i++)
                   jb = new JLabel(" ");
                   cp.add(jb);
    //***********************6th row*************************************************//
    //***********************7th row*************************************************//
                   for(int i = 0; i < 2; i++)
                        jb = new JLabel(" ");
                        cp.add(jb);
                   ok2 = new JButton("OK");
                   cp.add(ok2);
                   for(int i = 0; i < 2; i++)
                        jb = new JLabel(" ");
                        cp.add(jb);
    //***********************7th row*************************************************//
              browse3.addActionListener(this);
              browse4.addActionListener(this);
              browse5.addActionListener(this);
              browse6.addActionListener(this);
              ok2.addActionListener(this);
              return cp;
         public void actionPerformed(ActionEvent e)
              if(e.getSource()==ok1)
                   String ncbi = "";
                   String repeat= "";
                   try
                        ncbi = jtf1.getText();
                        repeat = jtf2.getText();
                        System.out.println("NCBI" + ncbi + "www");
                        if( ncbi.equals(" ") && repeat.equals(" "))
                             System.out.println("NCBI333" + ncbi);
                             DisplayInfo di = new DisplayInfo("Sorry!, Please select some file", "");
                             di.setSize(450,100);
                             di.setLocation(600,600);
                             di.setVisible(true);
                             GBFileProp.snpFile = "";
                             GBFileProp.geneFile = "";
                             return;
                   catch(Exception ex)
                   GBFileProp.fileFormat="NCBI";
                   GBFileProp.fileName = ncbi;
                   GBFileProp.repeatFile = repeat;
                   ReadNCBI readFile1 = new ReadNCBI(ncbi);
                   ReadRepeatFile rrf = new ReadRepeatFile(repeat);
                   try
                        gb = new GBMainFrame();
                        gb.setSize(1200,750);
                   catch(Exception ex)
                        DisplayInfo di = new DisplayInfo("Sorry!, Wrong File", "Enter file in \".gbk\" format");
                        di.setSize(450,100);
                        di.setLocation(600,600);
                        di.setVisible(true);
                   setVisible(false);
                   setDefaultCloseOperation(DISPOSE_ON_CLOSE);
              if(e.getSource()==ok2)
                   String sequence= "";
                   String repeat= "";
                   String snp= "";
                   String gene= "";
                   try
                        sequence = jtf3.getText();
                        repeat = jtf4.getText();
                        snp = jtf5.getText();
                        gene = jtf6.getText();
                        if( sequence.equals(" ") && repeat.equals(" ") && snp.equals(" ") && gene.equals(" "))
                                                      DisplayInfo di = new DisplayInfo("Sorry!, Please select some file", "");
                             di.setSize(450,100);
                             di.setLocation(600,600);
                             di.setVisible(true);
                             System.out.println("File " + GBFileProp.repeatFile);
                             return;
                   catch(Exception ex)
                   GBFileProp.fileFormat="Other";
                   GBFileProp.fileName = sequence;
                   GBFileProp.repeatFile = repeat;
                   GBFileProp.snpFile = snp;
                   GBFileProp.geneFile = gene;
                   ReadGeneFile a = new ReadGeneFile(gene);
                   ReadSNPFile rsp = new ReadSNPFile(snp);
                   GCReadFile grf = new GCReadFile(sequence);
                   ReadRepeatFile rrf = new ReadRepeatFile(repeat);
                   try
                        gb = new GBMainFrame();
                        gb.setSize(1200,800);
                   catch(Exception ex)
                        DisplayInfo di = new DisplayInfo("Sorry!, Wrong File", "Enter file in corresponding format");
                        di.setSize(450,100);
                        di.setLocation(600,600);
                        di.setVisible(true);
                   setVisible(false);
                   setDefaultCloseOperation(DISPOSE_ON_CLOSE);
              if(e.getSource()==browse1)
                   String w;
                   Fselect(1);
                   try
                   w=f.toString();
                   jtf1.setText(w);
                   catch(Exception ex)
              if(e.getSource()==browse2)
                   String w;
                   Fselect(4);
                   try
                   w=f.toString();
                   jtf2.setText(w);
                   catch(Exception ex)
              if(e.getSource()==browse3)
                   String w;
                   Fselect(3);
                   try
                   w=f.toString();
                   jtf3.setText(w);
                   catch(Exception ex)
              if(e.getSource()==browse4)
                   String w;
                   Fselect(2);
                   try
                   w=f.toString();
                   jtf4.setText(w);
                   catch(Exception ex)
              if(e.getSource()==browse5)
                   String w;
                   Fselect(4);
                   try
                   w=f.toString();
                   jtf5.setText(w);
                   catch(Exception ex)
              if(e.getSource()==browse6)
                   String w;
                   Fselect(2);
                   try
                   w=f.toString();
                   jtf6.setText(w);
                   catch(Exception ex)
              if(e.getActionCommand().equals("sequence_ncbi"))
                   final JFileChooser chooser = new JFileChooser();
                   FileFilter type1 = new ExtensionFilter ("Fasta File(.faa)", new String[] {".faa",".txt"});
                   chooser.addChoosableFileFilter (type1);
                   chooser.setFileFilter (type1);
                   int returnVal = chooser.showOpenDialog(this);
                   if (returnVal == JFileChooser.APPROVE_OPTION)
                        seqFile = chooser.getSelectedFile();
              else if(e.getActionCommand().equals("sequence_other"))
                   final JFileChooser chooser = new JFileChooser();
                   FileFilter type1 = new ExtensionFilter ("Fasta File(.faa)", new String[] {".faa",".txt"});
                   chooser.addChoosableFileFilter (type1);
                   chooser.setFileFilter (type1);
                   int returnVal = chooser.showOpenDialog(this);
                   if (returnVal == JFileChooser.APPROVE_OPTION)
                        seqFile = chooser.getSelectedFile();
         public void itemStateChanged (ItemEvent e)
              GBFileProp.windowsize = (int)Integer.parseInt(winSize.getSelectedItem().toString());
              GBFileProp.shiftsize = (int)Integer.parseInt(shiftSize.getSelectedItem().toString());
         public void Fselect(int sel)
                   final JFileChooser chooser = new JFileChooser();
         ImageIcon openIcon = new ImageIcon("images/open.gif");
                   FileFilter type1 = new ExtensionFilter ("NCBI File(.gbk)", new String[] {".gbk",".txt"});
                   FileFilter type2 = new ExtensionFilter ("ptt File(.ptt)", new String[] {".ptt",".txt"});
                   FileFilter type3 = new ExtensionFilter ("Fasta File(.faa)", new String[] {".faa",".txt"});
                   FileFilter type4 = new ExtensionFilter ("Text File(.txt)", new String[] {".txt",".txt"});
                   chooser.setCurrentDirectory (new File (System.getProperty ("user.dir")));
                   if(sel == 1)
                        chooser.addChoosableFileFilter (type1);
              chooser.setFileFilter (type1);
                   if(sel == 2)
                        chooser.addChoosableFileFilter (type2);
              chooser.setFileFilter (type2);
                   if(sel == 3)
                        chooser.addChoosableFileFilter (type3);
              chooser.setFileFilter (type3);
                   if(sel == 4)
                        chooser.addChoosableFileFilter (type4);
              chooser.setFileFilter (type4);
         int returnVal = chooser.showOpenDialog(this);
                   if (returnVal == JFileChooser.APPROVE_OPTION)
                        f = chooser.getSelectedFile();
                        //System.out.println("path of open "+ f);
    //GBMainFrame file
    package igib.genebrowser;
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    import igib.genebrowser.menu.*;
    import igib.genebrowser.plot.*;
    import igib.genebrowser.util.*;
    public class GBMainFrame extends JFrame
         GBMainMenu gb;
         PlotGraph pg;
         JPanel jf = new JPanel();
         JPanel jf1;
         LineGraph lg, lg1;
         JPanel jp1, jp2;
         JLabel jl;
         public GBMainFrame()
              super("File: " + GBFileProp.fileName + " " + GBFileProp.repeatFile + " " + GBFileProp.snpFile + " " + GBFileProp.geneFile);
              Container cp = this.getContentPane();
              cp.setLayout(new BorderLayout());
              cp.setSize(1024,600);
              Color c1=new Color(255,100,100);
              jf = new JPanel(new GridLayout(1,15));
    cp.add(jf, BorderLayout.NORTH);
              pg = new PlotGraph();
              pg.setBackground(Color.white);
              cp.add(pg, BorderLayout.CENTER);
              GBFileProp.jsb.setUnitIncrement(5);
              cp.add(GBFileProp.jsb, BorderLayout.SOUTH);
              lg1 = new LineGraph();
              lg1.setBackground(Color.white);
              lg1.setSize(50, 1000);
              cp.add(lg1, BorderLayout.EAST);
              lg = new LineGraph();
              lg.setBackground(Color.white);
              cp.add(lg, BorderLayout.WEST);
              gb = new GBMainMenu();
              jf.add(gb);
              setVisible(true);
              repaint();
    //PlotGraph File
    package igib.genebrowser.plot;
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.util.*;
    import java.awt.image.*;
    import java.io.*;
    //import Acme.JPM.Encoders.*;
    //import Acme.*;
    import java.awt.print.*;
    import java.awt.Component;
    import java.awt.print.PrinterJob;
    import igib.genebrowser.menu.*;
    import igib.genebrowser.util.*;
    import igib.genebrowser.*;
    public class PlotGraph extends JPanel implements MouseListener,MouseMotionListener
         int xcoordinate;
         JScrollBar scrollBar;
         int mouseX;
         int mouseY;
         String st1 = " ";
         JScrollPane jsp;
         int check;
         int n;
         double base;
         int value;
         String repeatSymbol = "!";
         int position[] = new int[1500];
         public PlotGraph(String st)
              check = 0;
              GBFileProp.check = false;
         setVisible(true);
              ToolTipManager.sharedInstance().setInitialDelay(0);
              addMouseListener(this);
              addMouseMotionListener(this);
         public PlotGraph()
              check = 0;
              //System.out.println(GBFileProp.gcmax + "max y");
              if(GBFileProp.genescore>5)
              GBFileProp.filesize = GBFileProp.readGeneEnd[GBFileProp.genescore - 6];
              //System.out.println(GBFileProp.seqscore + " GBFileProp.seqscore");
              if(GBFileProp.filesize < GBFileProp.seqscore)
                   GBFileProp.filesize = GBFileProp.seqscore;
              if(GBFileProp.snpscore>5)
                   if(GBFileProp.filesize < GBFileProp.readSNPPosition[GBFileProp.snpscore-6])
                        GBFileProp.filesize = GBFileProp.readSNPPosition[GBFileProp.snpscore-6];
              if(GBFileProp.repeatscore>2)
                   if(GBFileProp.filesize < GBFileProp.endRepeatPosition[GBFileProp.repeatscore-2])
                        GBFileProp.filesize = GBFileProp.endRepeatPosition[GBFileProp.repeatscore-2];
              GBFileProp.scrollsize = (int)GBFileProp.filesize/285;
              GBFileProp.check = true;
         setVisible(true);
              addMouseListener(this);
              addMouseMotionListener(this);
              try
              AdjustmentListener lst = new AdjustmentListener()
                   public void adjustmentValueChanged(AdjustmentEvent e)
                        int i = e.getValue();
                        value = i;
                        GBFileProp.defaultStartCoordinate = (int)(e.getValue()*10*base);
                        GBFileProp.defaultEndCoordinate = GBFileProp.defaultStartCoordinate + (int)(10000*base);
                        repaint();
              GBFileProp.jsb.addAdjustmentListener(lst);
              catch(Exception e)
                   System.out.println("error here" + e);
    //******************** For Painting all the graph**********************************//
         public void paintComponent(final Graphics g)
              super.paintComponent(g);
              Font f = new Font("Times-Roman", Font.PLAIN, 16);
              g.setFont(f);
              GBFileProp.scrollsize = (int)GBFileProp.filesize/285;
              base = (double)(100.0/GBFileProp.zoomSize);
              n = (int)(GBFileProp.filesize/base);
              GBFileProp.jsb.setMaximum(n/10);
              if(GBFileProp.checkSave)
                   GBFileProp.checkSave = false;
                   Image img = this.createImage(1200,800);               
                   Graphics gph = img.getGraphics();
                   this.paint(gph);
                   try
                        OutputStream os = new FileOutputStream(GBFileProp.save);
                        GifEncoderTest ge = new GifEncoderTest(img,os);
                        ge.encode();
                        os.close();
                        catch(Exception e){}
              if(GBFileProp.checkPrint)
                   try
                        GBFileProp.checkPrint = false;
                        RepaintManager.currentManager(this).setDoubleBufferingEnabled(false);
                        PrinterJob pj=PrinterJob.getPrinterJob();
                        pj.printDialog();
                        pj.print();
                   catch (Exception PrintException)
                        System.out.println("print error" + PrintException);
                        GBFileProp.checkPrint = false;
              if(SetVisibleClass.isMerge)
                        GBFileProp.snpposition = 500;
                        GBFileProp.geneposition = 500;
                        GBFileProp.repeatposition = 500;
                        GBFileProp.userdefinedpoint = 500;
                   else
                        GBFileProp.snpposition = 450;
                        GBFileProp.geneposition = 400;
                        GBFileProp.repeatposition = 150;
                        GBFileProp.userdefinedpoint = 500;
              if(GBFileProp.check)
                   try
                        if(SetVisibleClass.isSNP)
                        drawSNPPage(g);
                   catch(Exception e)
                        System.out.println("Error in snp plotting");
                   try
                        drawGenePage(g);
                   catch(Exception e)
                        System.out.println("Error in gene plotting");
                   try
                        if(SetVisibleClass.isGC)                    
                        drawGCPage(g);
                   catch(Exception e)
                        //System.out.println("Error in GC plotting");
                   try
                        drawUserDefinedPage(g);
                   catch(Exception e)
                        System.out.println("Error in User Defined plotting");
                   try
                        if(SetVisibleClass.isRepeat)                    
                             drawRepeatPage(g);
                   catch(Exception e)
                        System.out.println("Error in Repeat plotting");
    //******************** For Painting all the graph**********************************//
    //***************************** For Painting Gene**********************************//
         public void drawGenePage(Graphics g1)
              Graphics2D g = (Graphics2D)g1;
              g1.setColor(Color.darkGray);
              g.drawLine(0,650,(int)10000,650);
              //g1.setColor(Color.b);
              BasicStroke pen = new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND);
    g.setStroke(pen);
    //****************************** X coordinate *************************************//
              for(int i = 0; i < 10000; )
                   int xcor = (GBFileProp.defaultStartCoordinate + (int)(i*base));
                   String xCoordinate = "" + xcor;
                   g.drawLine((int)(i/10),645,(int)(i/10),655);
                   g.drawString(xCoordinate,(int)(i/10),665);
                   i = i + 1000; //+ (int)(1000/base);
    //****************************** X coordinate *************************************//
              if(SetVisibleClass.isGene)
                   g1.setColor(Color.darkGray);
                   g1.drawString("Gene:", 10, (GBFileProp.geneposition - 25));
                   g1.setColor(GBColorSymbol.cGene);
                   for (int i = 0; i < GBFileProp.genescore ; i++) // - 5 to b subtracted from genescore
                        int basestart = (int)((GBFileProp.readGeneStart[i] - (int)(GBFileProp.defaultStartCoordinate))/base); ///10;
                        int baseend = (int)((GBFileProp.readGeneEnd[i] - (int)(GBFileProp.defaultStartCoordinate))/base);
                        if(basestart >=0 && baseend <=(int)(10000))
                             checkGenePosition(i);
                             g.drawLine((int)((basestart/10)),GBFileProp.geneposition,(int)((baseend/10)),GBFileProp.geneposition);
                             arrow(true,true,i, g, basestart, baseend);
                        if(basestart >=0 && baseend > (int)(10000))
                             checkGenePosition(i);
                             g.drawLine(basestart/10,GBFileProp.geneposition,1000,GBFileProp.geneposition);
                             arrow(true,false,i, g, basestart, 10000);
                        if(basestart < 0 && baseend <= (int)(10000))
                             checkGenePosition(i);
                             g.drawLine(0,GBFileProp.geneposition,baseend/10,GBFileProp.geneposition);
                             arrow(false,true,i, g, 0, baseend);
                        if(basestart < 0 && baseend > (int)(10000))
                             checkGenePosition(i);
                             g.drawLine(0,GBFileProp.geneposition,1000,GBFileProp.geneposition);
                   //System.out.println("GeneSt: " + GBFileProp.readGeneStart[i] + " GeneEd: " + GBFileProp.readGeneEnd[i] + " No " + i + "GeneScore " + GBFileProp.genescore);     
    //*****************************End For Painting Gene**********************************//
    //*****************************Start For Painting snp**********************************//
         public void drawSNPPage(Graphics g1)
              //System.out.println(GBFileProp.snpscore + "for snp");
              Graphics2D g = (Graphics2D) g1;
              BasicStroke pen = new BasicStroke();
              g.setStroke(pen);
              //g.setColor(Color.Red);
              g.drawString("SNP", 20, GBFileProp.snpposition);
              g.setColor(GBColorSymbol.cSnp);
              for(int i = 0; i < GBFileProp.snpscore; i++)
                   int basePosition = (int)((GBFileProp.readSNPPosition[i] - GBFileProp.defaultStartCoordinate)/base);
                   //System.out.println(" position " + (basePosition/10));
                   //g.drawString("|",(basePosition/10),GBFileProp.snpposition);
                   g.drawString(GBColorSymbol.snpSymValues[GBColorSymbol.snpSym],(basePosition/10),GBFileProp.snpposition);
                                                                                                                  //Line SNP score
              //System.out.println(GBFileProp.snplinescore);
              for(int i = 0; i < GBFileProp.snplinescore-1; i++)
                   int basePosition = (int)((GBFileProp.readSNPStartPosition[i] - GBFileProp.defaultStartCoordinate)/base);
                   //g.drawString("|",(basePosition/10),GBFileProp.snpposition);
                   g.drawString(GBColorSymbol.snpSymValues[GBColorSymbol.snpSym],(basePosition/10),GBFileProp.snpposition);
              for(int i = 0; i < GBFileProp.snplinescore-1; i++)
                   int basestart = (int)((GBFileProp.readSNPStartPosition[i] - (int)(GBFileProp.defaultStartCoordinate))/base); ///10;
                   int baseend = (int)((GBFileProp.readSNPEndPosition[i] - (int)(GBFileProp.defaultEndCoordinate))/base);
                   System.out.println(basestart + "     " + baseend);
                   if(basestart >=0 && baseend <=(int)(10000))
                             g.drawLine((int)((basestart/10)),GBFileProp.snpposition,(int)((baseend/10)),GBFileProp.snpposition);
                   if(basestart >=0 && baseend >(int)(10000))
                             g.drawLine((int)((basestart/10)),GBFileProp.snpposition,(int)((1000)),GBFileProp.snpposition);
                   if(basestart < 0 && baseend <=(int)(10000))
                             g.drawLine((int)((0)),GBFileProp.snpposition,(int)((baseend/10)),GBFileProp.snpposition);
                   if(basestart < 0 && baseend > (int)(10000))
                             g.drawLine((int)((0)),GBFileProp.snpposition,(int)((1000)),GBFileProp.snpposition);
    //*****************************Start For Painting GCPlotting**********************************//
         public void drawGCPage(Graphics g1)
              Graphics2D g = (Graphics2D) g1;
              g1.setColor(Color.darkGray);
              g.drawString("GC Percentage", 20, 20);
              BasicStroke pen = new BasicStroke();
              g.setStroke(pen);
              g1.setColor(Color.black);
              //System.out.println(GBFileProp.seqscore + " score");
              for(int i = 0; i < (int)((10000)*base); )
                   //System.out.println(GBFileProp.defaultEndCoordinate + " " i" " + GBFileProp.defaultStartCoordinate);
                        //System.out.println(GBFileProp.gcposition);
                        int firstPosition = (int)GBFileProp.GCPercentage[(int)((((int)(i) + GBFileProp.defaultStartCoordinate)/GBFileProp.shiftsize))] * (3*100)/GBFileProp.gcmax;
                        int secondPosition = (int)GBFileProp.GCPercentage[(int)((((int)((i+GBFileProp.shiftsize)) + GBFileProp.defaultStartCoordinate)/GBFileProp.shiftsize))] * (3*100)/(GBFileProp.gcmax);
                        g.drawLine((int)((i/10)/base), GBFileProp.gcposition - firstPosition, (int)(((i+GBFileProp.shiftsize)/10)/base), GBFileProp.gcposition - secondPosition);
                        i = i + GBFileProp.shiftsize;
              for(int i = 0; i < GBFileProp.seqscore -1; i++)
                   int firstPosition = (int)Integer.parseInt(GBFileProp.GCPoint.elementAt(i).toString()) * 3;
                   int secondPosition = (int)Integer.parseInt(GBFileProp.GCPoint.elementAt(i+50).toString()) * 3;
                   //int secondPosition = (int)GBFileProp.GCPercentage[i+50] * 3;
                   //g.drawString("|",basePosition,300);
                   g.drawLine((int)(i/10), 300 - firstPosition, (int)(i+50)/10, 300 - secondPosition);
                   i = i + 49;
    //*****************************End For Painting GCPlotting**********************************//
    //*****************************Start For Painting Repeat File**********************************//
         public void drawRepeatPage(Graphics g1)
              int check = 0;
              Graphics2D g = (Graphics2D) g1;
              g.setColor(Color.darkGray);
              g.drawString("Repeat", 10, 480);
              for (int i = 0; i < GBFileProp.repeatscore ; i++)//- 1 to b subtracted from repeatscore
                   int basestart = (int)((GBFileProp.startRepeatPosition[i] - (int)(GBFileProp.defaultStartCoordinate))/base); ///10;
                   int baseend = (int)((GBFileProp.startRepeatPosition[i] - (int)(GBFileProp.defaultStartCoordinate))/base);
                   if(basestart > 0 && basestart < 10000)
                        try
                             if(GBFileProp.repeatFamily.equals("LINE"))
                                  System.out.println(" Line" );
                                  GBFileProp.repeatposition = 575;
                                  repeatSymbol = GBColorSymbol.repeatSymValues[GBColorSymbol.lineSym];
                                  if(GBFileProp.repeatName[i].length() >= 2)
                                       if(GBFileProp.repeatName[i].substring(0,2).equals("L1"))
                                            g.setColor(GBColorSymbol.cL1);
                                            g.drawString(repeatSymbol, (int)(basestart/10), GBFileProp.repeatposition);
                                       else if(GBFileProp.repeatName[i].substring(0,2).equals("L2"))
                                            g.setColor(GBColorSymbol.cL2);
                                            g.drawString(repeatSymbol, (int)(basestart/10), GBFileProp.repeatposition);
                                       else if(GBFileProp.repeatName[i].substring(0,2).equals("L3"))
                                            g.setColor(GBColorSymbol.cL3);
                                            g.drawString(repeatSymbol, (int)(basestart/10), GBFileProp.repeatposition);

  • Multiple FileFilter in a JFileChooser

    I wanna have a save file dialog with a list of choosableFileFilter that the user can select. Here is my code :
    import java.io.File;
    import javax.swing.filechooser.FileFilter;
    public class ImageFilter extends FileFilter {
        private static String description;
        private static String extension;
        private static String loadOrSave;
        private final static String jpeg = "jpeg";
        private final static String jpg = "jpg";
        private final static String gif = "gif";
        private final static String tiff = "tiff";
        private final static String tif = "tif";
        private final static String png = "png";
        public ImageFilter(String ext,String desc,String type) {
            super();
            extension = ext;
            description = desc;
            loadOrSave = type;
        public boolean accept(File f) {
            if (loadOrSave.equals("load")) { // "load" ==> only accept files with the final extension above
                if (f.isDirectory()) {
                    return true;
                String ext = getExtension(f);
                if (ext != null) {
                    if (ext.equals(tiff) || ext.equals(tif) || ext.equals(gif) ||
                        ext.equals(jpeg) || ext.equals(jpg) || ext.equals(png)) {
                        return true;
                    else return false;
                return false;
            else { // "save" ==> only accept files with extension "extension"
                if (f.isDirectory()) {
                    return true;
                String ext = getExtension(f);
                if (ext != null) {
                    if (ext.equals(extension)) return true;
                    else return false;
                return false;
        // Get the extension of a file.
        public static String getExtension(File f) {
            String ext = null;
            String s = f.getName();
            int i = s.lastIndexOf('.');
            if (i > 0 &&  i < s.length() - 1) {
                ext = s.substring(i+1).toLowerCase();
            return ext;
        //The description of the Image filter
        public String getDescription() {
            if (loadOrSave.equals("load")) return "Images (*.jpg,*.jpeg,*.gif,*.png,*.tiff,*.tif)";
            else return description;
        public static String getSaveExtension() {
            if (loadOrSave.equals("save")) return extension;
            else return null;
    }I then use my class in the following code fragment :
    JFileChooser fc = new JFileChooser(currentdir);
            ImageFilter bmp = new ImageFilter("bmp","Images BMP (*.bmp)","save");
            ImageFilter jpeg = new ImageFilter("jpeg","Images JPEG (*.jpeg)","save");
            ImageFilter jpg = new ImageFilter("jpg","Images JPG (*.jpg)","save");
            ImageFilter png = new ImageFilter("png","Images PNG (*.png)","save");
            ImageFilter wbmp = new ImageFilter("wbmp","Images WBMP (*.wbmp)","save");
            fc.addChoosableFileFilter(bmp);
            fc.addChoosableFileFilter(jpeg);
            fc.addChoosableFileFilter(jpg);
            fc.addChoosableFileFilter(png);
            fc.addChoosableFileFilter(png);
            fc.setAcceptAllFileFilterUsed(false);
            int returnVal = fc.showSaveDialog(fc);The problem is that the choosable FileFilters in the save dialog have the same description : Images WBMP (*.wbmp). I don't understand why. I created different ImageFilters and then add them one by one. So where's the problem ?
    Thx in advance.

    Damned !
    I'm always asking myself if I have to use the static modifier for a class variable.
    I don't really understand the concept of static variables...
    I think static variables belongs to the class and not to the instances of this class.. Am I right ?

  • Filefilter for jfilechooser --Confused-

    JFileChooser JFC=new JFileChooser();
    JFC.setFileFilter(new ExeFileFilter());
    class ExeFileFilter implements FileFilter
    {          public boolean accept(File TheFile)
              if(TheFile.getName().endsWith("exe"))
              return true;
         return false;
    }the above code doesnt work, tried several possibilities
    can anyone help me??

    what i want is that the JFilechooser show only exe
    file..
    helpdid you read the examples in JFilechooser Tutorial?
    all you have to do is modify to it.
    here's the code:
    ImageFilter Class
    import java.io.File;
    import javax.swing.*;
    import javax.swing.filechooser.*;
    public class ImageFilter extends FileFilter {
        //Accept all directories and all gif, jpg, tiff, or png files.
        public boolean accept(File f) {
            if (f.isDirectory()) {
                return true;
            String extension = Utils.getExtension(f);
            if (extension != null) {
                if (extension.equals(Utils.tiff) ||
                    extension.equals(Utils.tif) ||
                    extension.equals(Utils.gif) ||
                    extension.equals(Utils.jpeg) ||
                    extension.equals(Utils.jpg) ||
                    extension.equals(Utils.png)) {
                        return true;
                } else {
                    return false;
            return false;
        //The description of this filter
        public String getDescription() {
            return "Just Images";
    }Utils Class
    import java.io.File;
    import javax.swing.ImageIcon;
    /* Utils.java is used by FileChooserDemo2.java. */
    public class Utils {
        public final static String jpeg = "jpeg";
        public final static String jpg = "jpg";
        public final static String gif = "gif";
        public final static String tiff = "tiff";
        public final static String tif = "tif";
        public final static String png = "png";
         * Get the extension of a file.
        public static String getExtension(File f) {
            String ext = null;
            String s = f.getName();
            int i = s.lastIndexOf('.');
            if (i > 0 &&  i < s.length() - 1) {
                ext = s.substring(i+1).toLowerCase();
            return ext;
        /** Returns an ImageIcon, or null if the path was invalid. */
        protected static ImageIcon createImageIcon(String path) {
            java.net.URL imgURL = Utils.class.getResource(path);
            if (imgURL != null) {
                return new ImageIcon(imgURL);
            } else {
                System.err.println("Couldn't find file: " + path);
                return null;
    }

  • Using jFileChooser and FileFilter

    I am using a jFileChooser and want to add a file filter to only show .jpg files. I tried using...
    FileFilter filter = new FileFilter();
    filter.addExtension("jpg");
    filter.setDescription("JPG Images");
    fileChooser.setFileFilter(filter);
    fileChooser.showSaveDialog(jPanel1)I get an error saying FileFilter is an abstract. I was wondering how I can successfully filter a jFileChooser. Also, what imports libraries do I need to perform the task. I have looked at sample code and it seems they do their own classes, I want to know how to handle this task using the libraries java provides.

    Here's another way to do it, using an anon. inner
    class:
    JFileChooser chooser = new JFileChooser();
    chooser.setFileFilter(new FileFilter() {
    public String getDescription() { return "Image
    files"; }
    public boolean accept(File f) {
    if(f.isDirectory()) return true;
    if(f.getName().endsWith(".jpg")) return true;
    if(f.getName().endsWith(".png")) return true;
    return false;
    /code]
    I find myself using a lot of anon. inner classes in
    Swing.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • FileFilter  doesnot work in JFileChooser

    Hi all
    I am creating my own file filter so that jfilechooser will show only specified files. But I am not able to see any files other than directories.
    Here is my code:
    class MyFilter extends javax.swing.filechooser.FileFilter{
         public boolean accept(File f) {
              if (f.isDirectory()) {
                   return true;
                   String ext = null;
                   String s = f.getName();
                   int i = s.lastIndexOf('.');
                   if (i > 0 && i < s.length() - 1) {
                        ext = s.substring(i+1).toLowerCase();
                     String extension = ".rl"; //accepting only '.rl'files
                 if(ext !=null){
                         if (extension.equals(ext)){
                                return true;
                     } else {
                            return false;
                 }else
                   return true;
         }//end of fucntion
         //The description of this filter
         public String getDescription() {
              return "*.rl";
         } //end of function
    }//end of classhere is how I create JFileChooser:
    chooser=new JFileChooser();
    chooser.setMultiSelectionEnabled(false);
    chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
    chooser.setControlButtonsAreShown(false);          
    chooser.setDialogType(JFileChooser.OPEN_DIALOG);
    chooser.addChoosableFileFilter(new MyFilter());
    chooser.setAcceptAllFileFilterUsed(false);Pls suggst me about how to resolve this.
    Regards

    Its working now. I cahnged my sode as:
    public boolean accept(File f) {
              if (f.isDirectory()) {
                   return true;
              String ext = null;
              String s = f.getName();
              if(s.endsWith(".rl"))
                   return true;
              else
                   return false;
    }//end of f unction

  • Requesting Minor Help Please... in a Query

    Hi All,
            Below is my query, The time i exceute it, outer select clause gives me 'Colomn ambiguously defined' error msg.
            Without outer select clause, it goes fine. Please guide me, what i miss here.
            Also would be grateful, if anyone suggest me about writing this query in a better or optimized way. Thanks
    SELECT   MAX(A.START_FX_TRAN_ID)
                   ,MAX(A.end_fx_tran_id)
         ,A.entered_dt_ts
         ,A.USER_NAME
         ,A.trade_dt
         ,A.deal_number
         ,A.fx_deal_type
         ,A.orientation_buysell
         ,A.base_ccy
         ,A.base_ccy_amt
         ,A.secondary_ccy
         ,A.secondary_ccy_amt
         ,A.MATURITY_DT
         ,A.TRADE_RT
         ,A.FORWARD_PTS              
         ,A.CORPORATE_PIPS           
         ,A.DEAL_OWNER_INITIALS      
         ,A.CORPORATE_DEALER         
         ,A.PROFIT_CENTER_CD
         ,NULL
         ,NULL
         ,NULL
         ,NULL
         ,NULL
         ,NULL
         ,NULL
         ,NULL
         ,A.counterparty_nm
         ,A.counterparty_number
         ,NULL
         ,NULL
         ,NULL
         ,NULL
         ,NULL
         ,NULL
         ,NULL
         ,NULL
         ,NULL
         ,NULL
         ,NULL
         ,NULL
         ,NULL
         ,NULL
         ,NULL
         ,NULL
         ,NULL
         ,NULL
         ,NULL
         ,NULL
         ,NULL
         ,NULL
         ,NULL
         ,NULL
         ,NULL
         ,NULL
         ,NULL
         ,NULL
         ,NULL from
    (SELECT
         start_tx.fx_tran_id START_FX_TRAN_ID
        ,end_tx.fx_tran_id end_fx_tran_id
        ,start_tx.entered_dt_ts
        ,USER USER_NAME
        ,start_tx.trade_dt
        ,start_tx.deal_number
        ,start_tx.fx_deal_type
        ,start_tx.orientation_buysell
        ,start_tx.base_ccy
        ,start_tx.base_ccy_amt
        ,start_tx.secondary_ccy
        ,start_tx.secondary_ccy_amt
        ,start_tx.MATURITY_DT
        ,start_tx.TRADE_RT
        ,start_tx.FORWARD_PTS              
        ,start_tx.CORPORATE_PIPS           
        ,start_tx.DEAL_OWNER_INITIALS      
        ,start_tx.CORPORATE_DEALER         
        ,start_tx.PROFIT_CENTER_CD
        ,NULL
        ,NULL
        ,NULL
        ,NULL
        ,NULL
        ,NULL
        ,NULL
        ,NULL
        ,start_tx.counterparty_nm
        ,start_tx.counterparty_number
        ,NULL
        ,NULL
        ,NULL
        ,NULL
        ,NULL
        ,NULL
        ,NULL
        ,NULL
        ,NULL
        ,NULL
        ,NULL
        ,NULL
        ,NULL
        ,NULL
        ,NULL
        ,NULL
        ,NULL
        ,NULL
        ,NULL
        ,NULL
        ,NULL
        ,NULL
        ,NULL
        ,NULL
        ,NULL
        ,NULL
        ,NULL
        ,NULL
        ,NULL
    FROM
        (SELECT * FROM fx_transactions WHERE gmt_conv_entered_dt_ts >=  TO_DATE('20-Nov-2013 4:00:23 AM','DD-Mon-YYYY HH:MI:SS AM')) start_tx
       ,(SELECT * FROM fx_transactions WHERE gmt_conv_entered_dt_ts <=  TO_DATE('20-Nov-2013 4:59:59 PM','DD-Mon-YYYY HH:MI:SS AM')) end_tx WHERE
        NVL(start_tx.corporate_dealer,'nullX')       = NVL(end_tx.corporate_dealer,'nullX')       AND
        start_tx.COUNTERPARTY_NM        = end_tx.COUNTERPARTY_NM         AND
        start_tx.COUNTERPARTY_NUMBER    = end_tx.COUNTERPARTY_NUMBER     AND
        start_tx.fx_deal_type           = end_tx.fx_deal_type            AND
        start_tx.BASE_CCY               = end_tx.BASE_CCY                AND
        start_tx.SECONDARY_CCY          = end_tx.SECONDARY_CCY           AND
        start_tx.ORIENTATION_BUYSELL   != end_tx.ORIENTATION_BUYSELL   
        AND  start_tx.fx_tran_id = 1855303
        ) A
    LEFT OUTER JOIN
        (SELECT
             start_tx.fx_tran_id START_FX_TRAN_ID
            ,end_tx.fx_tran_id end_fx_tran_id
            ,start_tx.entered_dt_ts
            ,USER
            ,start_tx.trade_dt
            ,start_tx.deal_number
            ,start_tx.fx_deal_type
            ,start_tx.orientation_buysell
            ,start_tx.base_ccy
            ,start_tx.base_ccy_amt
            ,start_tx.secondary_ccy
            ,start_tx.secondary_ccy_amt
            ,start_tx.MATURITY_DT
            ,start_tx.TRADE_RT
            ,start_tx.FORWARD_PTS              
            ,start_tx.CORPORATE_PIPS           
            ,start_tx.DEAL_OWNER_INITIALS      
            ,start_tx.CORPORATE_DEALER         
            ,start_tx.PROFIT_CENTER_CD
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,start_tx.counterparty_nm
            ,start_tx.counterparty_number
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
        FROM
            (SELECT * FROM fx_transactions WHERE gmt_conv_entered_dt_ts >=  TO_DATE('20-Nov-2013 4:00:23 AM','DD-Mon-YYYY HH:MI:SS AM')) start_tx
           ,(SELECT * FROM fx_transactions WHERE gmt_conv_entered_dt_ts <=  TO_DATE('20-Nov-2013 4:59:59 PM','DD-Mon-YYYY HH:MI:SS AM')) end_tx
        WHERE
            NVL(start_tx.corporate_dealer,'nullX')       = NVL(end_tx.corporate_dealer,'nullX')       AND
            start_tx.COUNTERPARTY_NM        = end_tx.COUNTERPARTY_NM         AND
            start_tx.COUNTERPARTY_NUMBER    = end_tx.COUNTERPARTY_NUMBER     AND
            start_tx.fx_deal_type           = end_tx.fx_deal_type            AND
            start_tx.BASE_CCY               = end_tx.BASE_CCY                AND
            start_tx.SECONDARY_CCY          = end_tx.SECONDARY_CCY           AND
            start_tx.ORIENTATION_BUYSELL    != end_tx.ORIENTATION_BUYSELL
            AND
            (start_tx.base_ccy_amt          = end_tx.base_ccy_amt          
            OR
            start_tx.secondary_ccy_amt      = end_tx.secondary_ccy_amt)
            AND  start_tx.fx_tran_id = 1855303
            ) B
          ON (A.START_FX_TRAN_ID=B.START_FX_TRAN_ID AND A.END_FX_TRAN_ID=B.END_FX_TRAN_ID)
    LEFT OUTER JOIN
        (SELECT
             start_tx.fx_tran_id START_FX_TRAN_ID
            ,end_tx.fx_tran_id end_fx_tran_id
            ,start_tx.entered_dt_ts
            ,USER
            ,start_tx.trade_dt
            ,start_tx.deal_number
            ,start_tx.fx_deal_type
            ,start_tx.orientation_buysell
            ,start_tx.base_ccy
            ,start_tx.base_ccy_amt
            ,start_tx.secondary_ccy
            ,start_tx.secondary_ccy_amt
            ,start_tx.MATURITY_DT
            ,start_tx.TRADE_RT
            ,start_tx.FORWARD_PTS              
            ,start_tx.CORPORATE_PIPS           
            ,start_tx.DEAL_OWNER_INITIALS      
            ,start_tx.CORPORATE_DEALER         
            ,start_tx.PROFIT_CENTER_CD
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,start_tx.counterparty_nm
            ,start_tx.counterparty_number
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
            ,NULL
        FROM
             (SELECT * FROM fx_transactions WHERE gmt_conv_entered_dt_ts >=  TO_DATE('20-Nov-2013 4:00:23 AM','DD-Mon-YYYY HH:MI:SS AM')) start_tx
            ,(SELECT * FROM fx_transactions WHERE gmt_conv_entered_dt_ts <=  TO_DATE('20-Nov-2013 4:59:59 PM','DD-Mon-YYYY HH:MI:SS AM')) end_tx
        WHERE
            NVL(start_tx.corporate_dealer,'nullX')= NVL(end_tx.corporate_dealer,'nullX')       AND
            start_tx.COUNTERPARTY_NM         = end_tx.COUNTERPARTY_NM         AND
            start_tx.COUNTERPARTY_NUMBER     = end_tx.COUNTERPARTY_NUMBER     AND
            start_tx.fx_deal_type            = end_tx.fx_deal_type            AND
            start_tx.BASE_CCY                = end_tx.BASE_CCY                AND
            start_tx.SECONDARY_CCY           = end_tx.SECONDARY_CCY           AND
            start_tx.ORIENTATION_BUYSELL    != end_tx.ORIENTATION_BUYSELL
            AND
                end_tx.base_ccy_amt BETWEEN (start_tx.base_ccy_amt - (start_tx.base_ccy_amt * :perc_dev/100)) AND (start_tx.base_ccy_amt + (start_tx.base_ccy_amt * :perc_dev/100))        
                OR
                end_tx.secondary_ccy_amt BETWEEN (start_tx.secondary_ccy_amt - (start_tx.secondary_ccy_amt*:perc_dev/100) ) AND (start_tx.secondary_ccy_amt + (start_tx.secondary_ccy_amt*:perc_dev/100))
                AND start_tx.fx_tran_id = 1855303
            ) C
            ON (A.START_FX_TRAN_ID=C.START_FX_TRAN_ID AND A.END_FX_TRAN_ID=C.END_FX_TRAN_ID)
    GROUP BY
    A.entered_dt_ts
    ,USER
    ,A.trade_dt
    ,A.deal_number
    ,A.fx_deal_type
    ,A.orientation_buysell
    ,A.base_ccy
    ,A.base_ccy_amt
    ,A.secondary_ccy
    ,A.secondary_ccy_amt
    ,A.MATURITY_DT
    ,A.TRADE_RT
    ,A.FORWARD_PTS              
    ,A.CORPORATE_PIPS           
    ,A.DEAL_OWNER_INITIALS      
    ,A.CORPORATE_DEALER         
    ,A.PROFIT_CENTER_CD
    ,A.counterparty_nm
    ,A.counterparty_number

    Sanjeev, Thanks for your precious time.
    It works now but a.user didn't work well, i have given an alias name for user in A inline view and then used alias name in select and group by clause.

  • Conversion of Mysql query in oracle acceptable query format

    Hi
    I have successfully converted my MySql database in oracle. Now the problem is how to execute already written hundreds of Mysql query on the oracle. There are many syntax variation in Mysql query format which is not acceptable for oracle.
    For Example
    Select case_id as 'this is alias' from cases
    The above query can run on Mysql database but have problem while executing Oracle, because single quotes should be replaced with double quotes before executing it on oracle. There are also many other syntax conflicts.
    I have tried to resolve the problem through SwisSQLAPI but problem still exist as SwisSQLAPI is not dealing with all syntax conflict. In my case (select if (expresion, true,false)) must be replace with decode (expression, value,true,false) function of oracle and this conversion is not supported by SwisSQLAPI.
    Please help me in resolving this problem
    Thanks

    The problem with trying to port from one language (mysql SQL) to another (oracle SQL) is that there's generally no hard rules for a computer to follow, that it will get it 100% correct.
    Look at babelfish when you translate a foreign language to English. The end result is readable (usually), but it's rarely completely correct.
    The problem is when you feed something into Oracle SQL, it needs to be 100% correct.
    All you can really do here is rewrite these queries. It shouldn't actually take as long as you think, because 50% of queries will generally need very minor changes you can do in a minute, and 25% won't need any changes at all.

Maybe you are looking for

  • Time Machine, hard drive full

    Hello there, I'm using time machine for my back up, I've get a message saying mi disk it's full, and I want time machine to continue back up in en other empty disk. I would like to do a back up that it's connected one to en other, a continuation, not

  • Account determination problem

    In tcode MIGO i am getting error '' Account determination  for entry CAIN BSX - 3000 not possible'' { Message no. M8147 } .Can you please guide me ? I am online.

  • How do I limit number of characters in a JTextField?(different from others)

    Hi, I know this question has been posted several times on this forum, but my question is actually a different one. So please read. I have the following code that puts two JTextFields in a JFrame. I want to limit the number of characters in the first

  • Export to PDF is not printing all the columns in one single page.

    Hi, I have a report, I am exporting the report to PDF, but ALL the columns are not printing in a single page, It is getting printed 2 or more pages. I am okay if I have a horizontal scroll bar or if the test size is reduced. Please see the recording

  • VF11 reverse billing, but no FI document generated

    Our current posting period is 2008/03, the FI posting period 2008/02 has been closed. We create one billing document in period 02/2008, and now we'd like to reverse this billing document via t-code VF11. However, during reversal, a information messag