Results 1 to 9 of 9
  1. #1
    uniflare is offline Member
    Join Date
    Mar 2010
    Posts
    6
    Rep Power
    0

    Question Embedding browser functionality in a Java application

    Hello there,

    - Short about me -
    I have programming experience in PHP. eg, OOP/Classes/loops etc etc.
    I am understanding the data types and syntax of JAVA etc.

    - My problem -
    Having just started trying to use JAVA to develop a custom Browser-enabled application. i have hit a solid wall:

    I have a simple Java Swing Application. Created using NetBeans IDE 6.8.
    i have created a simple tabbed gui, one of the tabs is labeled "Browser".

    This Browser tab, will need to function like a very simple web browser, it needs to handle: HTML/CSS/Javascript and Cookies. It also needs to be able to extract information via DOM Walking to be used with other application components.

    - My thoughts -
    i have looked and googled my fingers to breaking point. i would imagine the best option for compatibility would be to use XULRunner. But i have no idea how to use it with NetBeans IDE, how to integrate it. I have searched for hours on this. Others like Jxbrowser cost money and i want this to be freeware so i dont want to pay anything.

    - Frustration -
    Compared to something like PHP, Java seems extremely ill-documented, with bits n pieces floating around since 2000. I just cant get any relevant information off any of the websites i view, unless its something really simple. like a hello world tutorial lol.

    - Conclusion -
    Any ideas, Explanations or solutions on a DOM walkable, Javascript/CSS Parsable Embedded Browser, are Extremely Appreciated.

    Thank you in advance almighty ones :p
    Last edited by uniflare; 03-13-2010 at 08:19 PM. Reason: Cosmetic

  2. #2
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,335
    Blog Entries
    7
    Rep Power
    20

    Default

    Bookmark these links for a complete reference and tutorial:

    The API documentation
    The Sun Java tutorial

    and here's the source code for an extremely simple web browser

    kind regards,

    Jos
    Last edited by JosAH; 03-13-2010 at 08:29 PM.

  3. #3
    uniflare is offline Member
    Join Date
    Mar 2010
    Posts
    6
    Rep Power
    0

    Default

    Wow thanks for the quick response, i'll look into those links in detail but, does anyone have any ideas on my specific problem? :).

  4. #4
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,335
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by uniflare View Post
    Wow thanks for the quick response, i'll look into those links in detail but, does anyone have any ideas on my specific problem? :).
    I edited my previous reply; have a look.

    kind regards,

    Jos

  5. #5
    uniflare is offline Member
    Join Date
    Mar 2010
    Posts
    6
    Rep Power
    0

    Default

    wow, thank you so much so far :).

    Is this browser capable of rendering HTML/Javascript/Images and Cookies?
    or are there other open source scripts that i can "stick together", like a cookie class etc? i know i can get a seperate dom walker class.

    And, how do i integrate this with netbeans into my tabbed pane? (i hope im not asking for too much), im guessing i cant just "Add from Pallette".

    Thanks again,
    Uni

  6. #6
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,335
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by uniflare View Post
    wow, thank you so much so far :).

    Is this browser capable of rendering HTML/Javascript/Images and Cookies?
    or are there other open source scripts that i can "stick together", like a cookie class etc? i know i can get a seperate dom walker class.

    And, how do i integrate this with netbeans into my tabbed pane? (i hope im not asking for too much), im guessing i cant just "Add from Pallette".

    Thanks again,
    Uni
    As I wrote: it's an extremely simple browser with hardly any functionality; it can draw html pages (including images) but there's no Javascript nor cookie support but it gives you the idea. You have to rip it from its own JFrame so you can stick it somewhere else.

    kind regards,

    Jos

  7. #7
    uniflare is offline Member
    Join Date
    Mar 2010
    Posts
    6
    Rep Power
    0

    Default

    Ok i think i may be able to get it to display in my tabbed pane, um, i would image cookie support would be relatively simple, but i cant possible write a javascript engine.

    i hope im not asking for too much, i just need a fully functional browser embedded in my application, one like JxBrowser, but obviously free ware, or one as close to that as possible. do you know about XULRunner, will that be what im looking for?

    Thanks again for your time.
    Uni

  8. #8
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,335
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by uniflare View Post
    Ok i think i may be able to get it to display in my tabbed pane, um, i would image cookie support would be relatively simple, but i cant possible write a javascript engine.

    i hope im not asking for too much, i just need a fully functional browser embedded in my application, one like JxBrowser, but obviously free ware, or one as close to that as possible. do you know about XULRunner, will that be what im looking for?

    Thanks again for your time.
    Uni
    Google is your friend; one of the first links it came up with is the Lobo browser. It also supports Javascript; I know nothing about it so I can't help you much with it. Why don'y you let your native browser do the job; have a look at the Desktop class for browser functionality.

    kind regards,

    Jos

  9. #9
    uniflare is offline Member
    Join Date
    Mar 2010
    Posts
    6
    Rep Power
    0

    Default

    Aw thanks for sticking with this thread and helpng me out ;).

    Yes i looked at the lobo browser, JFox and about 20 others (no exxageration) lol.

    Yes Cobra does look like it will do half the job i want (get, and extract elements from the DOM). But it is very light and i think still under development, though yes it is the best open-source java browser i can find.

    I have tried to implement this cobra browser into my project, but i cant get the window the display in my tabbed pane. Using netbeans it has some restrictions where you need to go around a long way to edit a line of code.

    I guess now my question is:
    What is the standard procedure for including another program into a tabbed pane?

    Thanks,
    Uni

Similar Threads

  1. How to auto start Java application form browser
    By marcinz in forum New To Java
    Replies: 5
    Last Post: 04-03-2011, 05:30 PM
  2. Browser Control in standlone application
    By tvks in forum New To Java
    Replies: 0
    Last Post: 12-18-2009, 09:37 AM
  3. Can't display web application in my browser
    By gissah in forum NetBeans
    Replies: 0
    Last Post: 03-18-2009, 03:19 AM
  4. Replies: 7
    Last Post: 10-06-2008, 04:01 PM
  5. Replies: 0
    Last Post: 06-23-2008, 11:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •