Browser in swing application without JEditorPane

Hi,
We are developing a free software for the school
children.
In our application, we want to display HTML file into
swing frame. So we are using class JEditorPane.
JEditorPane displays the output like a browser but it
distrubs the alignment of text and image. Even in java
docs they have accepted it.
Do you know how to get proper browser in swing to
display the HTML contents ? I mean how to render HTML
in swing?
The matter is bit urgent for us.
Waiting for the early reply.
regards,
Anand Kulkarni

Take a look at the JDIC project:
https://jdic.dev.java.net/
Then take a look at the Browser demo near the bottom of the page.
JDIC is a project by Sun to get closer ties to the native system. The Browser portion of the project lets you embed IE in a Swing app.

Similar Messages

  • Run Swing application without opening DOS prompt window

    is it possible to run a Swing application without opening a command interface window in MS Windows?
    thanks

    Don't know if you mean that, but if you try to call javaw.exe instead of java.exe there pops no prompt up.

  • Launching Browser From Swing Application - Help Needed

    Hi,
    I am opening a HTML file in Internet Explorer from my swing application.
    I am using the code given below
    private final static String WIN_FLAG = "url.dll,FileProtocolHandler";
    private final static String WIN_PATH = "rundll32";
    String cmd = WIN_PATH + " " + WIN_FLAG + " " + url;
    // url is HTML file Path
    Process p = Runtime.getRuntime().exec( cmd );
    The HTML file is opening up,but it always opens behind the swing application,that makes me every time to maximize the HTML file after it being opened up.
    I want to open it in front of the Swing Application.
    Any Help Please ?
    - Manikandan

    Browser Utility - Class to launch a URL in a web browser in
    a platform independent manner. Includes an optional swing
    GUI allowing user customization. [Open Source - GPL]
    http://ostermiller.org/utils/Browser.html
    BrowserLauncher - Open the system web browser with
    particular attention paid to various Macintosh systems.
    (Freeware)
    http://browserlauncher.sourceforge.net/
    Java World - With a little platform-specific Java code, you
    can easily use your system's default browser to display any
    URL in Windows or Unix.
    http://www.javaworld.com/javaworld/javatips/jw-javatip66.html
    JConfig - Class Libraries that allow a URL to be launched in
    a browser on Windows, Unix, or Macintosh. [Commercial]
    http://www.tolstoy.com/samizdat/jconfig.html
    Apple - MRJFileUtils.openURL() not implemented in Mac OS X.
    http://developer.apple.com/techpubs/macosx/ReleaseNotes/JavaGMWebReleaseNotes.html#MRJToolkit
    Apple - How one would open a URL in a web browser on a
    Macintosh.
    http://developer.apple.com/qa/java/java12.html

  • BC4J with Swing Application

    Is there possible to use Business Components for Java in Java/Swing applications without using any kind of application server?

    Yes. You just deploy your business components as a simple archive (JAR file). Your business components JAR file is then deployed to the client along with your ADF Swing JAR file. You will also have to deploy the ADF Runtime libraries to the client as well. The easiest way to deploy the standalone application is using Java Webstart. JDeveloper supports Webstart as a deployment method for ADF Swing applications. Unfortunately, there are some manual things that you have to do to package Oracle's ADF runtime libraries to do this, however. You can find the steps in this document: http://www.oracle.com/technology/products/jdev/collateral/papers/10g/adfjclientbcwebstart.pdf
    Hopefully, Oracle will simplify this process in a future version of JDeveloper.
    Hope this helps.

  • Need an overall brief view of developing a J2EE/Swing application

    Hello there
    I am curious to know how does a J2EE, JFC/Swing application work? I mean the front-end is coded in Swing. The backend is, say Oracle. How is the information sent to the database and retrievd back?? I know it is not so easy to explain about that here and there might be several ways as well. But if anyone could suggest me a place wherein I can get a fair idea, that would be great. Say, for example, there is a bank bank website and online transactions have to take place.... Or a purchase made at Amazon. I just want to know the various Java APIs involved in the process.
    Thak you so much. It would be of great help

    Hi,
    As you have said, at client end is a Swing GUI. The user requests usually goes either via specialized high level library, like java.sql/javax.sql for ODBC databases acces, java.rmi/CORBA for invoking some code on server, or goes directly through low level sockets (java.net) if speciall communication protocol is required.
    The exact way informations goes depends on backend implementation and protocol it uses. In most generic case, when both sides are specialized applications written in java the RMI will be propably easiest and most powerfull method.
    Ofcourse you are aware, that everything above can be done totally without java using good old CGI or PHP scripts as actually amazon.com does. If you are going to build web based front-end I strongly recommend to do it without java at user side - old CGI approach is in my opinion fastest and most user friendly way to do it (ie. think about poor creature which is using their cell-phone with www browser to see page full of java applets)

  • How to get mouse wheel action in my swing application?

    Hi
    In my mouse, i am having mousewheel to support scrolling.With the help of the wheel, i can scroll the pages in IE browser or any other appliction.
    In swing application ,i have scroll bar inside a JFrame.I want to have mousewheel action in my swing application to support scrolling.
    any idea ???
    Thanks

    As far as I know,there is no facility for detecting mouse scrolling wheel in JDK 1.3.
    Check it in the later releases of JDK.

  • Java Web Start 1.6 fails to start application without Java Consol on Vista

    Hi All,
    I've faced with problem related to starting my application in IE 7 on Vista SP1 using Java Web Start (JRE 1.6.0_12 and 1.6.0_13). I suppose that issue appears after 11th update of JRE 1.6 since it works fine before.
    There were set settings to indicate initial and maximal size of the Java heap in the JNLP file.
    Application consist of 2 JAR files and they are signed with the same certificate.
    When user tried to start application there is no any activity after accepting certificate. After starting application javaw.exe just disappeared from processes list without any message or error.
    When I changed default setting in Java Control Panel to show Java Console, I noticed that the application began to start. But it's not a solution of the issue, since all customers cannot be required to turn on Java console.
    I believe this is a bug in JRE as the application starts with Java console and doesn't without it.
    When I browsed the web looking for the solution or an advice I found Release notes for 1.6.0_014 where it was said that 6u14 Java Web Start failed to launch and notifies that JARs were not signed, if an insecure Java system property was specified in a sandbox JNLP file. In spite of that 14th updated wasn't used and there was no notification I tried to start application without settings for the Java heap and it worked.
    Could someone help me with advice, since the application cannot be started with default heap size settings.
    Thanks in advance.
    Edited by: vovanst on Jul 28, 2009 8:06 AM

    Hi,
    as the 6u15 just arrived and the above mentioned bug should've been fixed (though I was unable to verify through the release notes), the error is still in there.
    We have no timestamped jars, neither ours nor the bouncy castle ones, all certs are valid, ours is self signed.
    6u13 runs, 6u14/6u15 won't.
    I followed the instructions here: http://bouncycastle.org/devmailarchive/msg10415.html to no avail.
    The bcprov.jar is wrapped in its own jnlp and referred as extension from the "main" jnlp.
    The interesting parts of the stack trace are these:
    Caused by (via getCause): java.lang.SecurityException: JCE cannot authenticate the provider BC
         at javax.crypto.Cipher.getInstance(DashoA13*..)
         at javax.crypto.Cipher.getInstance(DashoA13*..)
    Caused by (via getCause): java.util.jar.JarException: Cannot parse https://localhost:8443/deploy/bcprov.jar
         at javax.crypto.SunJCE_c.a(DashoA13*..)
         at javax.crypto.SunJCE_b.b(DashoA13*..)
         at javax.crypto.SunJCE_b.a(DashoA13*..)
         at javax.crypto.Cipher.getInstance(DashoA13*..)
         at javax.crypto.Cipher.getInstance(DashoA13*..)
    For me it seems there's a problem with resolving the url of the bcprov.jar, which would explain the lack of a delay which normally occurs when JCE verifies the signature of the bcprov provider classes. The error pops up almost instantly.
    I'm clueless what to do now. Did Sun really achieve to completely destroy JCE provider functionality in Javaws, forcing us to use an alternative implementation?
    Patric

  • How to change the cursor type when a TableView class was added to a Swing application?

    We can resize column width by dragging the column divider in the table header. This is a built-in feature of the TableView class.
    Normally, the cursor will become to east-resize (or west-resize) type with positioning the cursor just to the right of a column header.
    However, I found that the cursor is remaining the default type at the same position if I integrate JavaFX into Swing Application. That is adding the TableView to a Scene, and then adding this Scene to a JFXPanel, finally, adding this JFXPanel to the JFrame.
    The sample codes are listing below:
    public class Run extends JFrame {
        Run() {
            setSize(600, 450);
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            initComponents();
        private void initComponents() {
            final JFXPanel fxPanel = new JFXPanel();
            this.getContentPane().add(fxPanel);
            Platform.runLater(new Runnable() {
                @Override
                public void run() {
                    initFX(fxPanel);
        private void initFX(JFXPanel fxPanel) {
            Scene scene = null;
            try {
                scene = FXMLLoader.load(
                    new File("res/fxml_example.fxml").toURI().toURL()
            } catch (Exception ex) {
                ex.printStackTrace();
            fxPanel.setScene(scene);
        public static void main(String[] args) {
            SwingUtilities.invokeLater(new Runnable() {
                @Override
                public void run() {
                    new Run().setVisible(true);
    fxml_example.fxml:
    <?xml version="1.0" encoding="UTF-8"?>
    <?import javafx.scene.Scene?>
    <?import javafx.scene.control.TableView?>
    <?import javafx.scene.control.TableColumn?>
    <Scene xmlns:fx="http://javafx.com/fxml">
        <TableView fx:id="tableView"
                   editable="true">
            <columns>
                <TableColumn text="COL1">
                </TableColumn>
                <TableColumn text="COL2">
                </TableColumn>
                <TableColumn text="COL3">
                </TableColumn>
                <TableColumn text="COL4">
                </TableColumn>
                <TableColumn text="COL5">
                </TableColumn>
            </columns>
        </TableView>
    </Scene>
    So, are there anyone can advise how to fix these codes; make the cursor can change to east-resize (or west-resize) type when this TableView class was added to a Swing application?

    Thanks for the report. I've just filed a JIRA issue: https://javafx-jira.kenai.com/browse/RT-34009
    //Anton.

  • Jdev 10.1.3.1 "ADF Security": Application without a custom login page?

    Hi,
    We are trying to develop an application using "ADF security", which means we can give permissions to certain roles based on "Binding Container", "Iterator Binding", "Method Action Binding" and "Attribute-level Binding".
    After reading the document -- "Oracle® Containers for J2EE Security Guide 10g (10.1.3.1.0) B28957-01" that Frank pointed out. We have a question:
    Can we develop an ADF application without creating a custom login page? Right now we've followed the security guide and modified the configuration files. But when we run the application, we get the "user null" error message. The reason is clear because we do not have a login page. On the security guide, it says that it is possible to use the oracle default login module. But it does not say how. Does anyone have any idea?
    Thanks,
    Annie

    Brenden,
    Thank you so much for the reply. This is our code in the web.xml:
    <login-config>
    <auth-method>BASIC</auth-method>
    <realm-name>default</realm-name>
    </login-config>
    We are using HTTP basic Authentication. This technique worked for the container-managed security. The browser default login page pops up when the end users try to log into a secured JSP. But here we want to use "ADF security" to set up "Iterator binding" and "Attribute level binding" security. The browser default login page does NOT show up. Instead we get the "user null" error message.
    If you have detailed step on how to select HTTP Basic Authentication, it would be very helpful to us. Or if you know any document has the detail.
    regards,
    Annie

  • Viewing and printing a PDF file from Java Swing Application

    Hello,
    I need to view and print PDF files from Java Swing Application.How do I do that?I appreciate your help.
    Thank you
    Sumana Somareddy

    If you have a link to the URL pointing to the PDF file, you can allow the browser to open it. Then use the print function of the browser to print the PDF document.
    Regards,
    Tak.

  • How to create a popup window to load HTML page in AIR application without using any mx or spark?

    How to create a popup window to load HTML page in AIR application without using any mx or spark components?
    I need to load the HTML page in popup in AIR application without using any of the <mx> or <spark> components. I need to open in the application itself not in the browser.(If we use navigateToURL() it will open in th browser)

    Can we achieve this? can somebody help me on this scenario..

  • Launching Browser from Swing Applicaton....

    Hi,
    i am launching browser from my swing application.While opening HTML file, always the HTML file goes behind the application.Everytime i have to maximize the html file window.
    i want the HTML file to come up in front of the swing application.
    any help please ??? itz very urgent.....
    Thanks in advance.
    Manikandan

    Browser Utility - Class to launch a URL in a web browser in
    a platform independent manner. Includes an optional swing
    GUI allowing user customization. [Open Source - GPL]
    http://ostermiller.org/utils/Browser.html
    BrowserLauncher - Open the system web browser with
    particular attention paid to various Macintosh systems.
    (Freeware)
    http://browserlauncher.sourceforge.net/
    Java World - With a little platform-specific Java code, you
    can easily use your system's default browser to display any
    URL in Windows or Unix.
    http://www.javaworld.com/javaworld/javatips/jw-javatip66.html
    JConfig - Class Libraries that allow a URL to be launched in
    a browser on Windows, Unix, or Macintosh. [Commercial]
    http://www.tolstoy.com/samizdat/jconfig.html
    Apple - MRJFileUtils.openURL() not implemented in Mac OS X.
    http://developer.apple.com/techpubs/macosx/ReleaseNotes/JavaGMWebReleaseNotes.html#MRJToolkit
    Apple - How one would open a URL in a web browser on a
    Macintosh.
    http://developer.apple.com/qa/java/java12.html

  • Deploy Swing application in sun studio

    I use Sun studio to write a swing application. How I can use this app in other computer(may be not install JDK or JRE)

    Your question doesn't have to do with SunONE Studio ...
    First off, of course the other computer needs to have at the very least a JRE installed. So if you assume they don't have a JRE, you need to arrange to deliver a JRE to them or include it with your installation procedure / tool.
    Think about the contents of a Swing/java app - it's a .jar file plus other resources (that can be bundled in the .jar file). It helps to have a launching script or .exe depending on the platform, but that's not absolutely necessary as on many platforms simply double clicking the .jar file will launch the app (assuming a JRE is properly installed).
    So deploying the application is just a matter of copying the .jar file to the system. But might involve the use of an "installer" depending on the needs of your customers.
    Another route that's unique to Java is Java Web Start - in this case you write a JNLP file (it's in XML format), put it out on a web server, and send the link around. The browser will help you to launch the application. The customer still needs to get a JRE installed, and once they do the JWS pieces are available. JWS will handle the installation of the actual application, plus if you need to update the app JWS will see the updates and copy new .jar files or whatnot to their system.
    - David

  • Start SWING App. without console

    Hi!
    How can I start a SWING application in WINDOWS2000 without opening a DOS console?
    Thanks
    Torsten

    Java applications will only work if the classpath is set properly. Thus if you double-click on a JAR (or something else associated with Java) you might find that nothing seems to happen. Usually it'll open a DOS windows, start Java, chuck an Error and close the window quickly.
    This doesn't mean that you should go round setting the system classpath to get all your applications to run - that's a recipe for disaster!
    Sometimes it's best just to create a new shortcut for your application, specifying the full Java command for running your application and click on that:
    javaw.exe -cp [your classpath here] MyMainClass
    or
    javaw.exe -cp [your classpath here] -jar MyMainJar.jar
    If the classpath gets long, though, this won't work 'cos Windows will only allow a certain length for the shortcut. You'll have to use an external file to list the classpath contents then. I doubt this will affect you yet, however.
    Hope this helps.

  • Is there a way that I can call a Swing application

    Hi all,
    Is there a way that I can call a Swing application from html page.
    fox example when user clicks on the url in html will activate a swing local application
    thanks

    Assuming the local swing application is running, and you have an applet in the browser that has permissions to communicate with a server other than the originating server, you could use RMI or a regular socket connection.
    Due to the obvious security issues to letting javascript or an applet free access to the local machine, this is not something that a browser really supports.

Maybe you are looking for

  • How can I put a stl::vector string into the DB and then get it out?

    Hello, As the title, here's a test case with problems,but anyway you can still run it. ( VC6/XP-32/BDB 4.7 ) I know this may be wrong,and I'd like to know how can I do this. Can someone help me please? I would appreciate it very much. ************ Co

  • Installed the last itunes update and now it won't recognize my library

    I just upgraded to 10.5.3 and now my library is not being recognized.  I can see it on my hard drive but the progran is treating me like a first time user.  I have the icloud service as well but can't seem to figure out how to get my library back.

  • Can anyone explain what's going on with this dual 2.0 G5???

    I've been trouble shooting my PowerMac G5 dual 2.0 recently. I've gotten to the point where I think it's the processors. I was getting random freezing and Kernel Panics so I bought a set of used 2.0 CPUs (U1 and U2)in unknown working condition. Well,

  • How does one empty an array during runtime with a front panel switch

    I can 'empty array' from the front panel during runtime but I want to empty all arrays (20) from my vi with a front panel switch (see screenshot). I have used replace array subset and reshape array with no success. Any help would be appreciated Attac

  • Updating lookup table using merge query

    Hi Experts, My requirement is, we have total 4 tables called x,y,z and a_lookup table. join column between all these tables is deptno. I need to update a_lookup table based on below conditions    condition1 :   Update a_lookup table with matched reco