JFileChooser not displaying

Platform:
OS: Windows XP SP3
Java: Java (TM) SE Runtime Environment (Build 1.6.0_30-b12)
My Java GUI applications with the above Windows OS and Java version will not display the JFileChooser dialog. Below is the java code segment. The java app hangs in the assignment statement and never displays the JFileChooser.
System.out.println(“Before declaration of d”);
JFileChooser d;
System.out.println(“After declaration of d and before assignment”);
d = new JFileChooser(); *// <-- java app hangs here and never displays JFileChooser*
System.out.println(“After assignment of d”);
This same code works on a Solaris 10 UNIX box with the same Java version.
Do you have any suggestions or recommendation on how to fix this issue?

Are U sure?
Your code works fine for me .. I even tried it just for the sake of it!
If U say the code blocks where U say it blocks, I presume U already debug it, right?
Well, don't know what else to tell U ...
But your code dont show the JFileChooser, U must add the followinf line:
d.showOpenDialog(compTheFileChooserParentWin);
Try it .. and let as know!
RGV
Edited by: ruivale on Feb 29, 2012 11:44 AM

Similar Messages

  • JFileChooser problem - it will not display

    I have read the tutorial on JFileChoosers and understand the basics, however, my application will simply not display a File Chooser. I select the menu option "open file" and the command prompt window just spews out dozens of garbage. The code is below if there are any FileChooser "Pros" out there. The FileChooser is selected for loading in the actioPerformed method. Thanks for any assistance.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.border.*;
    import java.io.*;
    import java.util.*;
    import javax.swing.JFileChooser;
    import javax.swing.filechooser.*;
    public class DissertationInterface extends JFrame implements ActionListener
         private JPanel onePanel, twoPanel, bottomPanel;
           private JButton quit,search;
           private JMenuBar TheMenu;
           private JMenu menu1, submenu;
         private JMenuItem menuItem1;
         private JFileChooser fc;          //FILE CHOOSER
           private BorderLayout layout;
           //Canvas that images should be drew on
           //drawTheImages Dti;
           //Instances of other classes
         //DatabaseComms2 db2 = new DatabaseComms2();
         //Configuration cF = new Configuration();
           public DissertationInterface()
                setTitle("Find My Pics - University Application") ;
                layout = new BorderLayout();          
                Container container = getContentPane();
                container.setLayout(layout);
                //Dti = new drawTheImages();
              //container.add(Dti);
                quit = new JButton("Quit");
                search = new JButton("Search");
                TheMenu = new JMenuBar();
                setJMenuBar(TheMenu);
                //FILE CHOOSER
                JFileChooser fc = new JFileChooser();     
                fc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
                //First menu option = "File";
                menu1 = new JMenu("File");
              TheMenu.add(menu1);
                //Add an option to the Menu Item
                menuItem1 = new JMenuItem("OPEN FILE",KeyEvent.VK_T);
            menuItem1.setAccelerator(KeyStroke.getKeyStroke(
            KeyEvent.VK_1, ActionEvent.ALT_MASK));
              menu1.add(menuItem1);
              menuItem1.addActionListener(this);          //action listener for Open file option
                //CREATE 3 PANELS
                onePanel = new JPanel();
                onePanel.setBackground(Color.blue);
                onePanel.setLayout(new FlowLayout(FlowLayout.CENTER, 200, 400)) ;
                twoPanel = new JPanel();
                twoPanel.setBackground(Color.red);
                twoPanel.setLayout(new GridLayout(5,2,5,5));
                bottomPanel = new JPanel();
                bottomPanel.setBackground(Color.yellow);
                bottomPanel.setLayout(new FlowLayout(FlowLayout.CENTER,10,10));
              //ADD COMPONENTS TO THE PANELS
                //Add the menu bar and it's items to twoPanel
              twoPanel.add(TheMenu, BorderLayout.NORTH);
              twoPanel.setAlignmentY(LEFT_ALIGNMENT);
                bottomPanel.add(quit);
                quit.addActionListener(this);          //action listener for button
                bottomPanel.add(search);
                search.addActionListener(this);          //action listener for button
                //ADD PANELS TO THE WINDOWS
                container.add(onePanel, BorderLayout.CENTER);
                container.add(twoPanel,BorderLayout.NORTH);            
                container.add(bottomPanel, BorderLayout.SOUTH);
                //setSize(350,350);
                setVisible(true);
              }//END OF CONSTRUCTOR
            public void leaveWindow()
                 this.dispose() ;
            public static void main(String args[])
            DissertationInterface DI = new DissertationInterface();
            DI.setVisible(true);
            //Display the window.
            DI.setSize(450, 260);
            DI.setVisible(true);
            DI.pack();
         }//End of main method
         protected void processWindowEvent(WindowEvent e)
                super.processWindowEvent(e);
                if(e.getID()== WindowEvent.WINDOW_CLOSING)
                      System.exit(0);
              }//End of processWindowEvent
    //method to resolve button clicks etc
    public void actionPerformed(ActionEvent e)
              //PROBLEM IS HERE !!!!!!! - why won't the file dialogue box open
              if(e.getActionCommand().equals("OPEN"))
                   int returnVal = fc.showOpenDialog(DissertationInterface.this);
                 else if(e.getActionCommand().equals("Quit"))
                      //closeDialog();
                      System.out.println("User interface exited");
                      System.exit(1);
                      leaveWindow();
              else if(e.getActionCommand().equals("Search"))
                      //pass params to database                                 
                 }//end of else if
    } //end of method ActionPerformed
    }//End of class DissertationInterface

    I have done as stated, code compiles/executes but when I select the open file option on my GUI, the command prompt window freezes and no dialogue box is displayed!!!!

  • JFileChooser file filter and view does not display Drive letters

    This code displays only files that end in abc.xml, and directories. For example, "helloabc.xml" and directory "world" will display as hello and world, respectively.
    However, I am surprised to find that the drive letters are not displayed at all. eg. C:
    any insights?
    thanks,
    Anil
    import java.io.File;
    import javax.swing.JFileChooser;
    import javax.swing.filechooser.FileFilter;
    import javax.swing.filechooser.FileView;
    public class NoDrive {
         protected static final String ABC_FILE_EXTN = "abc.xml";
         public String selectFile(String function){
              File file = null;
              JFileChooser fc = new JFileChooser();
              fc.setFileFilter(new FileFilter() {
                   public boolean accept(File f) {
                        if (!f.isFile() || f.getName().endsWith(ABC_FILE_EXTN))
                             return true;                    
                        return false;
                   public String getDescription() {
                        return "ABC files";
              fc.setFileView(new FileView() {
                   public String getName(File f) {
                        String name = f.getName();
                        if (f.isFile() && name.endsWith(ABC_FILE_EXTN))
                             return name.substring(0, name.indexOf(ABC_FILE_EXTN));
                        return name;
              int returnVal = fc.showDialog(null, function);
              if (returnVal == JFileChooser.APPROVE_OPTION) {
                   file = fc.getSelectedFile();
                   return file.getName();
              return null;
         public static void main(String[] args) {
              (new NoDrive()).selectFile("Open ABC");
    }

    OK. Here's the correct code:
        fc.setFileView(new FileView() {
          public String getName(File f) {
            String name = f.getName();
            if (f.isFile() && name.endsWith(ABC_FILE_EXTN)){
              return name.substring(0, name.indexOf(ABC_FILE_EXTN));
            else{
              return super.getName(f);
        });

  • JFileChooser does not display Korean files

    I have an application that uses JFileChooser to select some files. The application is bundled with English version of JRE 1.6.0_06. On Korean Windows 2003 the application displays files with filenames in Korean and allows them to be chosen. However on Korean Solaris 10, it does not even display the files? Anyone have an idea on why there is this discrepancy?
    I assume that the file with the Korean filename created on Korean Windows 2003 got created with the MS949 encoding for the filename. Similarly I assumed that the file with the Korean filename created on Korean Solaris 10 got created with UTF-8 encoding because that's the encoding set on Korean Solaris when I log in (its not set to EUC-KR). So how do I get the files to display and allow to be chosen on Korean Solaris?
    Thanks,
    Kartik
    P. S. I have the same problem with filenames in Japanese - on a Japanese Windows 2003 server the JFileChooser displays the files while on a Japanese Solaris 10 box, the JFileChooser does not display the files.

    Hi,
    I am trying to pick up data from an excel sheet and insert them into a database. However, once updated, they end up with '?' values.
    I have tried to make font.properties.ja as the default font.properties file, which failed to display Japanese characters.
    Any suggestions?
    This is a part of my code:
    String sJIS = "";
    sJIS = new String(cell1.getStringCellValue().getBytes("8859_1"), "JISAutoDetect");
    String sUTF = "";
    sUTF = new String(cell1.getStringCellValue().getBytes(), "UTF-16");
    System.out.println("sUTF" + sUTF + " " + "sJIS" + sJIS);
    Thanks,

  • JPanel not displaying in Windows

    I have a window displaying a panel and some buttons. I installed the application on Solaris and Windows. On Solaris, it displays fine every time. On Widows, it displays the first time I bring up the application but the panel does not display when I close it and bring it back up. Has anyone seen this before. I've put some debugging statements in, but I have no idea where to start looking.
    Thanks,
    Josh

    Here is the code that sets up the panel:
    // Initialize and GUI implementation
    private void jbInit() throws Exception {
    try{
    logger.fine("AudioEditPanel jbInit");
    this.setLayout(new BorderLayout());
    m_audioIcon = new ImageIcon(dataDir + File.separator + m_sAlertIcon);
    TitledBorder curSettingBorder = new TitledBorder(m_sCurSetting);
    TitledBorder soundBorder = new TitledBorder(m_sSound);
    m_editPanel.setLayout(new BorderLayout());
    // Create "Restore Default" button
    m_defaultButton.setText("Restore Default");
    m_defaultButton.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
         defaultButton_actionPerformed(e);
    m_currentPanel.setLayout(new BorderLayout());
    m_currentPanel.setBorder(curSettingBorder);
    m_currentPanel.setPreferredSize(new Dimension(155, 165));
    // Create customized tabel model
    AudioTableModel tableModel = new AudioTableModel();
    curTable = new JTable(tableModel);
    //Set up column sizes.
    initColumnSizes(curTable, tableModel);
    // Only allows single selection
    curTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    curTable.setBorder(BorderFactory.createLoweredBevelBorder());
    curTable.setColumnSelectionAllowed(false);
    curTable.getTableHeader().setReorderingAllowed(false);
    setUpWavEditor(curTable);
    //Fiddle with the Preview column's cell editors/renderers.
    setUpPreviewColumn(curTable.getColumnModel().getColumn(preview_column));
    // Add filter for the File Choose, so only Sound (*.wav) file
    // can be used.
    fc.addChoosableFileFilter(new WavFilter());
    fc.setAcceptAllFileFilterUsed(false);
    fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
    if (m_sDesDir != "") {
    File wav_dir = new File(m_sDesDir);
    fc.setCurrentDirectory(wav_dir);
    fc.setDialogTitle("List of audio files");
    m_assignPanel.setLayout(gridBagLayout1);
    m_assignPanel.setBorder(soundBorder);
    // "Selected Sound" label
    SelectSoundLabel.setFont(new java.awt.Font("Dialog", 0, 10));
    SelectSoundLabel.setForeground(Color.black);
    SelectSoundLabel.setText("Selected Sound:");
    //Click Browse button will pop up file chooser
    browseButton.setActionCommand("Browse");
    browseButton.setText("Browse");
    browseButton.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
         browseButton_actionPerformed(e);
    //Click preview button will play the sound defined in the sound text area
    previewButton.setIcon(m_audioIcon);
    previewButton.setMargin(new Insets(0, 0, 0, 0));
    previewButton.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
         previewButton_actionPerformed(e);
    // selected sound text field.
    sSoundText.setBorder(BorderFactory.createLoweredBevelBorder());
    sSoundText.addActionListener(new ActionListener() {
    public void actionPerformed (ActionEvent e) {
    sSoundText_actionPerformed(e);
    // "Preview" label
    previewTextArea.setFont(new java.awt.Font("Dialog", 0, 10));
    previewTextArea.setText("Preview");
    previewTextArea.setForeground(Color.black);
    // Use GridBag layout to put the components in the proper position
    m_defaultPanel.add(m_defaultButton, BorderLayout.CENTER);
    m_editPanel.add(m_assignPanel, BorderLayout.SOUTH);
    m_assignPanel.add(browseButton, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0,GridBagConstraints.SOUTHEAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 2, 0));
    m_assignPanel.add(previewButton, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0,GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 2));
    m_assignPanel.add(previewTextArea, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
    m_assignPanel.add(sSoundText, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 3), 257, 2));
    m_assignPanel.add(SelectSoundLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(3, 0, 6, 0), 6, 0));
    m_curScrollPanel.getViewport().add(curTable, BorderLayout.CENTER);
    m_currentPanel.add(m_curScrollPanel, BorderLayout.CENTER);
    m_currentPanel.add(m_defaultPanel, BorderLayout.SOUTH);
    m_editPanel.add(m_currentPanel, BorderLayout.NORTH);
    m_tabbedPane.addTab(m_sAudioSetting, m_editPanel);
    this.add(m_tabbedPane, BorderLayout.CENTER);
    checkAudioPrefs();
    }catch(Exception e){
    e.printStackTrace();
    System.out.println(e.getMessage());
    }

  • JApplet Form NOT Displayed on Web Page

    It is my JApplet code (that has been solved in this forum; refer to my previous Q) that is being successfully deployed, started, however, does not display the expected GUI (which is being displayed fine if is run as an Applet).
    The error message displayed in "Java Console" is below.
    java.lang.reflect.InvocationTargetException
        at java.awt.EventQueue.invokeAndWait(Unknown Source)
        at xmlAnalyticsPackage.XMLAnalysisToolBuilder.init(XMLAnalysisToolBuilder.java:36)
        at sun.applet.AppletPanel.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.NoClassDefFoundError: Could not initialize class sun.awt.shell.Win32ShellFolder2$ComTaskExecutor
        at sun.awt.shell.Win32ShellFolder2$ComTask.execute(Unknown Source)
        at sun.awt.shell.Win32ShellFolder2.getFileSystemPath(Unknown Source)
        at sun.awt.shell.Win32ShellFolder2.composePathForCsidl(Unknown Source)
        at sun.awt.shell.Win32ShellFolder2.<init>(Unknown Source)
        at sun.awt.shell.Win32ShellFolderManager2.getDesktop(Unknown Source)
        at sun.awt.shell.Win32ShellFolderManager2.get(Unknown Source)
        at sun.awt.shell.ShellFolder.get(Unknown Source)
        at javax.swing.filechooser.FileSystemView.getRoots(Unknown Source)
        at javax.swing.plaf.metal.MetalFileChooserUI.updateUseShellFolder(Unknown Source)
        at javax.swing.plaf.metal.MetalFileChooserUI.installComponents(Unknown Source)
        at javax.swing.plaf.basic.BasicFileChooserUI.installUI(Unknown Source)
        at javax.swing.plaf.metal.MetalFileChooserUI.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 xmlAnalyticsPackage.XMLAnalysisToolBuilder.initComponents(XMLAnalysisToolBuilder.java:63)
        at xmlAnalyticsPackage.XMLAnalysisToolBuilder.access$000(XMLAnalysisToolBuilder.java:30)
        at xmlAnalyticsPackage.XMLAnalysisToolBuilder$1.run(XMLAnalysisToolBuilder.java:38)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
    java.lang.reflect.InvocationTargetException
        at java.awt.EventQueue.invokeAndWait(Unknown Source)
        at xmlAnalyticsPackage.XMLAnalysisToolBuilder.init(XMLAnalysisToolBuilder.java:36)
        at sun.applet.AppletPanel.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.NoClassDefFoundError: Could not initialize class sun.awt.shell.Win32ShellFolder2$ComTaskExecutor
        at sun.awt.shell.Win32ShellFolder2$ComTask.execute(Unknown Source)
        at sun.awt.shell.Win32ShellFolder2.getFileSystemPath(Unknown Source)
        at sun.awt.shell.Win32ShellFolder2.composePathForCsidl(Unknown Source)
        at sun.awt.shell.Win32ShellFolder2.<init>(Unknown Source)
        at sun.awt.shell.Win32ShellFolderManager2.getDesktop(Unknown Source)
        at sun.awt.shell.Win32ShellFolderManager2.get(Unknown Source)
        at sun.awt.shell.ShellFolder.get(Unknown Source)
        at javax.swing.filechooser.FileSystemView.getRoots(Unknown Source)
        at javax.swing.plaf.metal.MetalFileChooserUI.updateUseShellFolder(Unknown Source)
        at javax.swing.plaf.metal.MetalFileChooserUI.installComponents(Unknown Source)
        at javax.swing.plaf.basic.BasicFileChooserUI.installUI(Unknown Source)
        at javax.swing.plaf.metal.MetalFileChooserUI.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 xmlAnalyticsPackage.XMLAnalysisToolBuilder.initComponents(XMLAnalysisToolBuilder.java:63)
        at xmlAnalyticsPackage.XMLAnalysisToolBuilder.access$000(XMLAnalysisToolBuilder.java:30)
        at xmlAnalyticsPackage.XMLAnalysisToolBuilder$1.run(XMLAnalysisToolBuilder.java:38)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)Please help on this.
    Nilanjan

    May be this bug has to do with you:
    [http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6544857]

  • JFileChooser - Changing Display Font

    Hi all
    Is there a very simple way to change the JFileChooser's display font from the default to say ("Verdana", Font.PLAIN, 11) without using a whole new look and feel?. I was contemplating the putClientProperty method but I've searched and can't seem to find any examples of how to use it.
    Any help is greatly appreciated.
    ICE

    You should define "display font" since that is not a Java term. If you want to change all the fonts, try the
    following (one version also changes the title bar's font).
    You could easily tweak this code to differential between different components -- say give JButtons a different font).
    import java.awt.*;
    import javax.swing.*;
    public class OptionPaneExample {
        public static void main(String[] args) {
            exampleWithFontChange();
            exampleWithFontChangeInTitleBar();
            System.exit(0);
        static void exampleWithFontChange() {
            Font font = new Font("Verdana", Font.PLAIN, 11);
            JFileChooser x = new JFileChooser();
            recursivelySetFonts(x, font);
            x.showOpenDialog(null);
        static void exampleWithFontChangeInTitleBar() {
            final Font font = new Font("Verdana", Font.PLAIN, 11);
            JDialog.setDefaultLookAndFeelDecorated(true); //optional
            JFileChooser x = new JFileChooser() {
                protected JDialog createDialog(Component parent) throws HeadlessException {
                    JDialog dialog = super.createDialog(parent);
                    recursivelySetFonts(dialog, font);
                    return dialog;
            x.showOpenDialog(null);
        public static void recursivelySetFonts(Component comp, Font font) {
            comp.setFont(font);
            if (comp instanceof Container) {
                Container cont = (Container) comp;
                for(int j=0, ub=cont.getComponentCount(); j<ub; ++j)
                    recursivelySetFonts(cont.getComponent(j), font);
    }

  • View the .rtf file not display the data in BI Publisher Enterprise.

    Hi,
    Platform: OBIEE 10g in NT XPsp2
    View the .rtf file not display the data in BI Publisher Enterprise.
    Step 1, I created Answer-request, create .rtf file with Word and add the request name, Add bar chart and table, preview PDF is working fine with data, Upload this template to Answers, View Template from Answer is working fine with data.
    Step 2, Answers – More Products > BI Publisher > My Folders > Create a new report > Edit > Data Model > New > Type: SQL Query > Data Source: Oracle BI EE > Query Builder > from SupplierSales assign Customer, Periods, Sales Facts (select Region, state, Year, Units Shipped) > Results > Save > Save
    Click Layouts > New > enter Name ….. > Click Layouts > borrows .rtf file in Manage T file > Upload > Save > Click View
    It is showing only the .rtf file without data. Why there is no data?
    Please guide me to solve this issue.
    Thanks,
    Jo

    Thanks for you reply,
    Our scenario is this report is basically a dissconnected mode report... we are developing these reports for mobile clients.
    We dint face this kind of issue while developing other reports.
    So please let us know if you have any idea on why we are facing this issue.
    Regards,
    Maneesh

  • Strange scenario,Oracle can not display the data in mysql correctly

    I use Heterogeneous Service+ODBC to achieve "oracle access mysql"(any other method?),and now i find Oracle can not display the data in mysql correctly:
    -------mysql------------
    mysql> create table tst(id int,name varchar(10));
    Query OK, 0 rows affected (0.00 sec)
    mysql> insert into tst values(1,'a');
    Query OK, 1 row affected (0.00 sec)
    mysql> select * from tst;
    ------------+
    | id | name |
    ------------+
    | 1 | a |
    ------------+
    1 row in set (0.00 sec)
    mysql> show create table tst\G
    *************************** 1. row ***************************
    Table: tst
    Create Table: CREATE TABLE `tst` (
    `id` int(11) DEFAULT NULL,
    `name` varchar(10) DEFAULT NULL
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8
    1 row in set (0.00 sec)
    -------------oracle ------------------
    SQL> select count(*) from "tst"@mysql;
    COUNT(*)
    49
    SQL> select * from "tst"@mysql;
    id
    1
    SQL> desc "tst"@mysql;
    Name Null? Type
    id NUMBER(10)

    You can make the following query on the result page:
    "select * from the_table where movietitle = ? and cinema = ?"
    then you set movietitle and cinema to those which the user selected. If the resultset contains more than 0 rows, that means the movie is available.
    Below is the sample code, it assumes you have a connection to the database:
    PreparedStatement stat = myConnection.prepareStatement("select * from the_table where movietitle = ? and cinema = ?");
    stat.setString(1, usersMovieTitleSelection);
    stat.setString(2, usersCinemaSelection);
    ResultSet res = stat.executeQuery();
    if (res.next()) {
    out.print("The movie is available");
    } else {
    out.print("The movie is not available");
    }Now just add that to your JSP page. Enjoy ! =)

  • Floating fields and fragment subforms in Outlook 2007 do not display correctly

    I'm using LCES Forms 8.0 Update 1 to render a non-interactive HTML forms using dynamic content (customer info). The email appears ok in clients except in Outlook 2007.
    The Floating text and Text Fields appear multiple times on the form (scattered around their placement point on the form) and the subform fragments are appearing with borders surrounding them.
    I have heard that there are issues with Outlook 2007 not displaying HTML correctly. Is there a way to setup the Text Fields/Subforms in Designer so they display correctly in Outlook 2007?
    Thanks!

    Create a new profile as a test to check if your current profile is causing the problems.
    See "Basic Troubleshooting: Make a new profile":
    *https://support.mozilla.org/kb/Basic+Troubleshooting#w_8-make-a-new-profile
    There may be extensions and plugins installed by default in a new profile, so check that in "Tools > Add-ons > Extensions & Plugins" in case there are still problems.
    If the new profile works then you can transfer some files from the old profile to that new profile, but be careful not to copy corrupted files.
    See:
    *http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

  • Umlauts are not displayed correctly in different programs

    Hello!
    I live in germany, but my locale is set to "en_US.UTF8" because I like to have everything in english.
    I do not have any problems with umlauts on the machine, but when I connect with sFTP oder Samba to it, the umlauts in files are not displayed correctly.
    Look at this example
    The upper word is how it looks in "ssh putty" (=locally on the machine), the bottom one is from "filezilla" (from my windows host)
    This is my locale
    locale
    LANG=en_US.UTF-8
    LC_CTYPE="en_US.UTF-8"
    LC_NUMERIC="en_US.UTF-8"
    LC_TIME="en_US.UTF-8"
    LC_COLLATE="en_US.UTF-8"
    LC_MONETARY="en_US.UTF-8"
    LC_MESSAGES="en_US.UTF-8"
    LC_PAPER="en_US.UTF-8"
    LC_NAME="en_US.UTF-8"
    LC_ADDRESS="en_US.UTF-8"
    LC_TELEPHONE="en_US.UTF-8"
    LC_MEASUREMENT="en_US.UTF-8"
    LC_IDENTIFICATION="en_US.UTF-8"
    LC_ALL=
    When I create a file "asd_aöü" locally on the machine (with the help of ssh - putty), it looks fine, but when I connect by samba or filezilla again the umlauts are not displayed correctly.
    Do you understand my problem? What can I do?
    Thanks!
    Last edited by cyberius (2011-02-19 10:12:19)

    Did you check the locale settings on your Windows machine?

  • Pictures not displaying in non-thumbnail sizes

    One of my clients has an iMac G5 running 10.4.11 and iPhoto 5.0.4. He's got about 3200 pictures in his iPhoto library which is about 12GB in size (they are all very large pictures). He's been using iPhoto without problem for years then suddenly he noticed that some pictures do not display in a slideshow. Out of the 3200 pictures he's narrowed it down so far to a few dozen pictures throughout his library. When we view the roll or the album with the pictures listed as thumbnails, we can see the picture just fine, but when we do anything that involves viewing at non-thumbnail size, such as double clicking on it or viewing in a slideshow it displays nothing. Slideshow just shows all black and double clicking on the thumb shows white with a spinning gear that never stops spinning. I rebuilt his library and that did not fix it. I repaired permissions, trashed iPhoto preferences, deleted tmp & cache files from his computer, I even zapped the PRAM out of desperation and nothing made any difference at all. One weird thing is that when it is siting at the white screen with spinning gear, if we resize the window smaller then resize it bigger, the picture will display properly but only for that time. It still will not display in slideshows.
    I tried exporting one of the troublesome pictures out of iPhoto to his desktop, delete the pic from iPhoto, then try re-importing it again. This time when we try to import it, iPhoto gives an error that the file couldn't be imported because it may be an unrecognized file type or may not contain valid data. I can open the pic on his desktop using Preview and Photoshop with no problems at all.
    Why am I posting this in the iPhoto '08 forum? well I copied the file to my MacBook Pro running 10.5.6 and iPhoto '08 and it almost does the same thing. I am able to import the file into iPhoto '08 and I can see the thumbnail but when I double click it, instead of a white screen with the spinning gear, i get a black screen and nothing else. I tried the trick of resizing the window and as I'm resizing, I do see a blocky image but as soon as I stop resizing the image goes black.
    I can open the file in any program on multiple computers: Photoshop, Preview, GraphicConverter, ColorSync Util, Safari, Firefox, etc. iPhoto version 5 and '08 (the only versions I have handy) refuse to work with the file. I've even edited the picture in photoshop by changing the resolution by just a few pixels and slightly tighter jpg compression but iPhoto still refuses to play nice with it.
    I have exhausted all options other than reinstalling the OS, but other posts I've read similar to this say that never fixes it. I am at a loss. What is wrong with iPhoto that it refuses to play nicely with pictures that work everywhere else in the world?
    I forgot to add that in Console there are several instances of iPhoto errors:
    "have info and image but no ciimage" and “have info and image but no ref”
    Message was edited by: Clint Mcintosh

    Clint:
    Try opening the file in one of the other applications that can use it and save as a new file and see if that new file is compatible with iPhoto. Or you might try this Automator workflow, Convert to JPG and Embed sRGB profile, on one and see if the resulting file will work. If so you can batch change all of them. It replaces the file you run it on so be sure to run it on a copy just to be safe. You can download it from Toad's Cellar or download it immediately with this link: Convert to JPG and Embed sRGB profile.zip.
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier versions) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. There are versions that are compatible with iPhoto 5, 6, 7 and 8 libraries and Tiger and Leopard. Just put the application in the Dock and click on it whenever you want to backup the dB file. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
    NOTE: iPhoto 8's new option in it's rebuild library window, "Rebuild the iPhoto Library Database from automatic backup" may make this tip obsolete. We'll know when users have occasion to use it and see if that's the case.

  • Images not displaying at their normal size, and not all keywords displaying, why?

    Not sure what's going on inside Adobe Bridge CC 2014.1, but why is it that my images are not displaying at full size. Bridge says they're displaying at 100% but I know that's not the case, because when I open the same images in Mac OS Preview (OS 10.10.1 Yosemite) at 100% they're much bigger. Is there a viewing preference setting I'm missing?
    Also, I use Bridge and Photoshop on two mac pro desktops: one at my office and one at home.
    At work, I created more than 30 keywords in Bridge for several hundred images that reside on my external thunderbolt hard drive. But when I take that hard drive home and connected it to my home mac and then open Bridge, only a handful of keywords appear. I don't see the full list of keywords that I created at work. But in Bridge, I didn't see any option to save or export keywords as a file.
    Although the image metadata does appear, because whatever keyword i assigned to an image at work does display on the home mac, I just don't see the entire keyword list.
    Can or should Bridge therefore only be used on one computer? Is it not possible to transfer the entire Bridge keyword list from one mac to another?
    Thanks in advance for any help feedback with this.

    Hi Zenos,
    I've discovered what is causing the problem, but I still need a way to fix it, if possible.
    The cause of the problem is that in Windows 7 Control Panel > Display I have set the size of "text and other items" to 150% (otherwise everything is much too small too read on my screen's recommended resolution of 1920×1080).
    I discovered that Irfan Viewer was also displaying at the incorrect resolution, but I managed to solve that problem by right-clicking on the IrfanView.exe icon and following Properties > Compatibility and selecting "Disable display scaling on high DPI settings".
    I tried the same procedure with Thunderbird, but it made no difference. It is still displaying at the incorrect resolution.
    Any suggestions?
    Regards,
    Catsix

  • Adobe Bridge CS3 - does not display thumbnails for Canon 40D or 50D RAW files

    I wanted to use Bridge to view my Canon EOS 50D RAW files and it does not display the thumbnails, just icons. I checked my 40D cr2 files and saw same thing.
    I have purged the cache and rest the cache preferences and it has not helped. I would like to be abl eto view the thumbnails of the RAW files via Bridge if possible. Jpg files and Tif files can be viewed without any issues.
    Am using Bridge version 2.1.1.9 and Pshop CS3 10.0.1

    I have the exact same problem. I can view my RAW file thumbnails (which are .ARW files from my Sony A200 camera) in the Finder and in other applications, such as Preview, but not in Adobe Bridge CS3. I know that I did try purging the cache at one point to see if that would fix it, but then I didn't know what to do after that. Before I purged the cache, I was able to view RAW thumbnails in Bridge, but then they would not increase in size when I tried using the slider (at the bottom right of the Bridge window)

  • Not displaying the data in to the table..wht is the issue

    I have problem for the displaying the RFC Model object date in to the table.
    I have created the Table in the view, Then  i have choosed  the "create  binding" option in the outLine window to map the perticular RFC model object to the Table to display. The data is not displaying in the table . But the RFC model object contains data. when i am trying to display with MessageMaganger.reporSuccess(). it is diplaying the data.
    Can any one tell me what is the issue.

    First, in your view layout in NWDS,  look at the tableview,  do you see fieldnames in the columns and rows.  If so, then I believe that you have bound correctly.    Also, in your executeBAPI method,  make sure that it looks something like this.
        public void executeBapi_Gl_Acc_Getlist_Input( )
        //@@begin executeBapi_Gl_Acc_Getlist_Input()
        try{
             wdContext.currentBapi_Gl_Acc_Getlist_InputElement().modelObject().execute();
        catch (Exception ex)
                  ex.printStackTrace();
    <b>    wdContext.nodeOutput().invalidate();</b>
        //@@end
    Regard,
    Rich Heilman

Maybe you are looking for