This Question is Answered

1 "helpful" answer available (2 pts)
7 Replies Last post: Jun 14, 2007 10:05 AM by Frankmartin Wiethüchter  
Frankmartin Wiethüchter   8 posts since
May 25, 2007
Currently Being Moderated

May 25, 2007 2:13 PM

My FullscreenSample based on CreateBrowserSample shows IE scroll-bar

Is it possible to hide the right  scroll-bar of the IE?

 

I wrote following sample to get a fullscreen browser:

 

import com.jniwrapper.win32.ie.Browser;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTextField;
import java.awt.BorderLayout;
import java.awt.GraphicsEnvironment;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class FullscreenSample
{
    private static final String HTML_CONTENT = "<html><body><h1>FullscreenSample</h1>Use the above textfield for your url.</body></html>";

    public static void main(String[] args) throws Exception
    {
        JFrame frame = new JFrame("JExplorer - FullscreenSample");
        // hide borders etc.
        frame.setUndecorated(true);
        // adjust frame to the default device
        frame.setBounds(GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration().getBounds());

        final Browser browser = new Browser();

        // add a JPanel with the browser and a textfield for URL
        JPanel panel = new JPanel(new BorderLayout());
        panel.add(browser);
        final JTextField textfield = new JTextField();
        textfield.addActionListener(new ActionListener()
        {
            public void actionPerformed(ActionEvent e)
            {
                browser.navigate(textfield.getText());
            }
        });
        panel.add(BorderLayout.NORTH, textfield);
        panel.add(BorderLayout.CENTER, browser);
        frame.getContentPane().add(panel);

        frame.setVisible(true);

        // Wait when the browser will be ready to work
        browser.waitReady();
        browser.setContent(HTML_CONTENT);
        browser.waitReady();
    }
}

 

Serge Piletsky TeamDev Ltd. 670 posts since
Apr 24, 2006

Hi Frankmartin,

 

Yes, it is possible. For this you just need to modify the appropriate property of a Browser object, for example:

 


    Browser browser = new Browser(); 
    browser.getProperties().setShowScrollBars(false);

 

-Serge

Vladimir Ikryanov TeamDev Ltd. 404 posts since
Apr 24, 2006

Hello Frankmartin,

 

I run your sample with the latest build of JExplorer and I didn't see any exceptions. Please try to use the latest build of JExplorer that you can download from our ftp: ftp://ftp.jniwrapper.com/updates/jexplorer-1.8.699.zip

 

Please try it and let us know the results.

 

Regards,

Vladimir

Vladimir Ikryanov TeamDev Ltd. 404 posts since
Apr 24, 2006
Currently Being Moderated
6. Jun 13, 2007 4:58 PM in response to: Frankmartin Wiethüchter
Re: ComException or Browser hangs

Hello Frankmartin,

 

Thank you for reporting this issue. We have updated release version of JExplorer. The reason of this issue it is a wrong version of JNIWrapper library in JExplorer pack. But we have fixed it. So, please try to download the latest version of JExplorer again from our site: http://teamdev.com/downloads/jexplorer/jexplorer-1.8.zip

 

Sorry for the inconvenience.

 

Regards,

Vladimir

More Like This

  • Retrieving data ...