Web Browser using GUI

Hello, I have make a Web Browser using Swing/AWT, I've done the basic Web Browser, my assignment asks for addtional functionality like Bookmarks, and history. I can't post all the code, but here's what i've done for both.
     * History menu and add file menu items
    private void makeHistoryMenu()
        historyItem = new JMenuItem("History");
        historyItem.setBackground(Color.white);
        historyItem.addActionListener(new ActionListener()
            public void actionPerformed(ActionEvent e)
                  //Add url to history;
       // historyMenu.add(location);
// Bookmark button
        bookmarkButton = new JButton("Bookmark");
        bookmarkButton.setToolTipText("Bookmark");
        bookmarkButton.addActionListener(new ActionListener()
            public void actionPerformed(ActionEvent evt)
                URL url;
                try
                    String location = locationInput.getText();
                    location = "http://" + location;
                    historyArray.add(location); // Do I need an arraylist to store the entries??
                catch (Exception e)
                    return;
        });it doesn't show the the bookmarks or the history
Thanks

you must add the button to the Component where you want to show it
(or the historyItem to the JMenu)
e.g.:
JFrame frame = new JFrame();
JButton historyButton = new JButton("History);
frame.add(historyButton);
frame.setVisible(true);
{code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • How to develop a web browser using API javatv?

    How to develop a web browser using API javatv?
    I'm tryin' to build a web browser using the API javaTv and
    I want to know if that is possible and if somebody already made this.
    This web browser will run a page developed in jsp.
    Thanks.

    You don't need JavaTV to write a web browser.
    Whichever Java platform you're using with JavaTV should provide enough.

  • How does one control the appearance of a web browser using Flash Builder?

    Using Flash Builder I wish to record the existing appearance of a web browser (e.g. position, size, menubar, caption bar, status bar) and change it to full screen, no caption, no menubar, no status bar, etc.  In this mode I will load a full screen graphic and other content in the browser and I want the user to not realize that everything is being displayed in a browser.  Later I need to return it to the initial appearance using the recorded settings.  Any guidance is appreciated.

    It appears that one must launch a new a new browser using JavaScript from Flash Builder whereby many, but not all of the properties I detailed, can be set.  Many browsers disable or can be configured to disable JavaScript from setting some of the properties.  Launching a new window in the 1st place is disabled in many browsers.

  • OpenGL in C++  displayed on a web browser using java??

    I have a OpenGL application written in CPP that I would like to display on a web browser.
    I was wondering if their is a way to do this using java. Maybe somekind of java wrap.
    Thank you

    Maybe some kind of ActiveX control perhaps ?
    Not too familar with ActiveX programming though...
    regards,
    Owen

  • How to open a pdf file in a web browser using jsp

    Hi,
    I have a problem opening pdf file in browser using jsp.the following is my code.Can anyone help me.Thanks
    response.setContentType("application/pdf");
    String filename="C:\\FictPos\\mypdf.pdf";
    File file = new File(filename);
    FileInputStream in = new FileInputStream(file);
    OutputStream out1=response.getOutputStream();
    byte[] buf = new byte[4096];
    int count = 0;
    while ((count = in.read(buf)) >= 0)
    out1.write(buf, 0, count);
    in.close();
    out1.close();
    }

    Don't know the problem specifically, but here are some suggestions to investigate:
    Does it show anything in the page when you view source on it?
    I would recommend using a servlet rather than a JSP page for this, if only for the fact the JSPs can insert carriage returns into places where you might not want them to. This might screw up the PDF file format?
    Try setting the a link to the jsp, right-click and "save target as..." just to see if it gets any response at all - ie bypass the browser display.
    Good luck,
    evnafets

  • How can I connect my mobile web browser using my computer connection

    I want to know if there is a way to connect to the internet mobile browser using my computer bluetooth, Its not my mobile connecting the internet for my computer its the other way around. I want to connect the net mobile phone through the bluetooth computer bandwith.

    One day with no response and you're whining? That's pathetic.
    And, you have likely received no response because the 'internet sharing' technology you are looking to employ is not explicitly supported by Mac OS X. It is not widely understood by users, as well. Some developers, notably Mark/Space, have written routines to enable internet sharing with selected smartphones, but they do not support conventional mobile handsets.
    If you use a Palm device or a pre-Windows Mobile 5 device, you can enable this technology by installing the appropriate Missing Sync package. Internet sharing is not supported by Windows Mobile 5 or later, or by the Blackberry OS.

  • Backspace navigation key not working in web browser using linux, but does on windoze

    using ubuntu 10.04 (lucid). when navigating a web forum, the backspace key (previous page) does not function. the scroll keys are a little jerky too. i have both 'use navigation keys' and 'smooth scrolling' enabled in options.

    See http://kb.mozillazine.org/browser.backspace_action

  • Battery Life on Web Browsing using Wifi only 3 Hours, how to expand?

    I am using MacBook                         Pro, Mac OS X (10.7.2), 2010 4 Gb, 2.66 Ghz Intel Core i7, 15 "
    Battery Health=92 %
                Cycles=491
    Using firefox on wifi, the battery lasts only 3 hrs. (Only Browsing and some downloading).
    Any tips on expanding the battery health,life and its time.

    User Tip:  Apple notebook batteries – maintenance and troubleshooting

  • ALV  report ON WEB BROWSER USING FUNCTION MODULE

    HI EXPERTS,
    USING FUNCTION MODULE IN ALV ......HOW CAN WE DISPLAY ALV ON BROWSER(INTERNET).

    hi
    good
    go through these links, you ll find detail idea about displaying a ALV output in a browser.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5dc3e690-0201-0010-1ebf-b85b3bed962d
    http://help.sap.com/saphelp_nw04/helpdata/en/3e/f496ef143a11d4b59f006094192fe3/content.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/77/3545415ea6f523e10000000a155106/frameset.htm
    thanks
    mrutyun^

  • Setting Default Web Browser using Preferences in Windows 2008

    Hi
    our users need to use both IE8 and Google Chrome. IE 8 is necessary due to issues with clinical apps etc. 
    However, we need to force IE8 as the default browser but allow users to access Google Chrome and not allow this to be set as default.
    There are several posts about "Maintenance Mode" settings but these are no longer available. 
    How can I achieve this?
    Thanks
    Albo

    Hi Albo,
    How is it going? For we are using Windows Server 2008 and IE8, we should still be able to use Internet Explorer Maintenance (IEM) to configure IE as default browser. Besides, if we can't use IEM, we can choose to use script or Group Policy Preferences
    Registry extension to edit registry to set IE as default browser.
    Regarding this point, the following thread can be referred to for more information.
    Default Browser via Group policy
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/e63fe81b-1ad8-4303-ad1d-e2f6e3d8cb0a/default-browser-via-group-policy?forum=winserverGP
    Best regards,
    Frank Shen

  • Adobe 9.1.3 and FireFox 3.5.1+ "...can not be used to view PDF files in a Web Browser"

    This is the issue but I'm not sure there is a resolution:
    Firefox:  Version 3.5.1
    Adobe: Version 9.1.3
    When navigating the web, click a URL that opens a PDF inside the browser and you get an error * "The Adobe Acrobat/Reader that is
    running can not be used to view PDF files in a Web Browser".  Please exit Adobe Acrobat/Reader and exit your Web Browser and try again".  I did read a post that doing a "repair" from the Adobe Reader application should fix this, they also reference a few registry keys to check becuase the post states it's lost the application path to Adobe version X.  I don't necessarily buy that "fix" and here are my details below.
    In FireFox if you navigate to Tools > Options > Applications > Adobe Acrobat Document
    You're given choices:
    Always ask:  DOES NOT WORK, produces afore mentioned error *
    Save File:  Works, saves the file to a directory on your PC
    Use Adobe Reader 9.1 (defau...:  Works, opens your PDF's outside of your web browser
    Use Adobe Acrobat (in Firefox):  DOES NOT WORK, produces afore mentioned error *
    Use other...:
    IE seems to just work as expected.
    If you open Adobe Reader > Edit > Preferences > Internet > Check "Display PDF in browser" - DOES NOT WORK, produces afore mentioned error *
    This would seem to be an Adobe error rather than a FireFox web browser problems since FireFox does seem to know the correct path although I suppose you can't rule out that this is a FireFox problem since 2 out of the 4 PDF open options DON'T WORK.
    Any thoughts on this issue would be greatly appreciated.
    Other information:
    Adobe 8.1.5 works perfectly with FF 3.5.1+ when opening PDF's in the web browser, we also had no problems with previous versions either.
    MSI push via Active Directory from Adobe 8.1.5 upgrade to Licensed Distribution I signed up for, Adobe 9.1.3 which was upgraded from 9.1.0, to 9.1.2, to 9.1.3 via an MSP patch.
    Operating system:  Windows XP SP 2, plenty of RAM, plenty of Drive
    IE version this works with the new version of Adobe 9.1.3 is version 7 (7.0.5730.13)
    Our FireFox MSI's come from Front Motions website and as far as I know we've never had problems with their MSI's, also tried the new release of FF 3.5.2 from their website.
    I think that about covers it.  Anyone else experiencing the same problems or have a patch?

    After troublshooting this for the entire day today the issue seems to be a MIME problem.
    If everything is woking perfectly, in Tools > Options > Applications...
    You should see 4 or more things related to Adobe like "Adobe Acrobat Forms Document", etc.  If you don't see at least 4 MIME entries either your Adobe installation is hosed or your FF installation is hosed.  I haven't figured out which is causing the issue.
    What I did was remaster my patches from my original Adobe 9.1.0 MSI with the two updates via the command line in the directories with the source files.  On the 9.1.0 original file I first remastered my MST transform with the Adobe MST utility.  I then applied my patches.
    msiexec /a AcroRead.msi /p AdbeRdrUpd912_all_incr.msp
    msiexec /a AcroRead.msi /p AdbeRdrUpd913_all_incr.msp
    I then uploaded that to my network share, unlinked my group policy, made a new group policy, added a batch file to delete adobe.com from program file and the desktop on system startup even though my MST was supposed to take care of that - it's not a perfect world is it?  :-)
    I then reapplied my GPO's for both FireFox 3.5.2 and Adobe 9.1.3, I checked to make sure the MIME extensions were there and they were.  You might have to go into your Adobe Preferences and select that open in browser setting depending on what happens or adjust your MIME settings in FireFox's options but it should work.
    That's what worked for me.  It's possible a few other things I did along the way tweaked it out, in my group policy on the first run I did select to upgrade previous group policies, for the remaster and repush I didn't select any previous GPO's to upgrade.
    It's hard to tell what one thing tweaked it out or what combination of things tweaked out the install.  I did also reinstall Adobe 8.1.5 and FF 3.0.10 before doing all this since our machines currently have that setup, I'm not sure if that affected it either, it's just hard to tell but I don't think it did simply because I had done that several times in troubleshooting this issue.
    If anyone else has more specifics that would be great!

  • How to launch my java application in a web browser?

    Hi. I try to launch my java application, e.g. "HellowWorld.java", using web browser.
    1. How can I change my java application program to java applet in general way?
    I read "Java: An Introduction to Computer Science and Programming, Third Edition"
    by Walter Savitch and found page 803 - "Converting a Swing application to an applet".
    My question is how I can know which class should be removed or not such as using JApplet instead of JFrame. Are there general rules about this?
    2. I found "AWT only" tutorial had some example lauching application using "AppletButton".
    How can I use this method to launch "HelloWorld.class"?
    http://java.sun.com/docs/books/tutorial/information/download.html#OLDui
    (after extracting zip file) -> ../OLDui/layout/card.html
    3. (continued 2) Can I use above method to embed applet into web browser?
    For example, java Swing application -> applet using "AppletButton" -> web browser using "<applet></applet>" tag.
    I'd appreciate any partial anwers of these questions or other suggestions.
    Thanks.

    Thanks! Here is what I got from your help.
    * HelloWorldSwing.java is a 1.4 example that
    * requires no other files.
    import javax.swing.*;  
    import java.awt.*;                //for Container class    
    //  public class HelloWorldSwing {
       public class HelloWorldSwingToApplet extends JApplet {
         * Create the GUI and show it.  For thread safety,
         * this method should be invoked from the
         * event-dispatching thread.
    //    private static void createAndShowGUI() {
          private void createAndShowGUI() {
            //Make sure we have nice window decorations.
    //        JFrame.setDefaultLookAndFeelDecorated(true);
            //Create and set up the window.
    //        JFrame frame = new JFrame("HelloWorldSwing");
    //        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         Container frameApplet = getContentPane();
            //Add the ubiquitous "Hello World" label.
            JLabel label = new JLabel("Hello World");
    //        frame.getContentPane().add(label);
         frameApplet.add(label);
            //Display the window.
    //        frame.pack();
    //        frame.setVisible(true);
          public void init() {
           createAndShowGUI();
    /*    public static void main(String[] args) {
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }

  • Web browser ...need help

    hello everyone..i have built a simple web browser using java..i can go to google.com or facebook.com but whenever i want to search something or want to login providing necessary information it doesnt work..can anyone tell me whats wrong here??nd how can i solve it?itz really urgent...
    here's my code :
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    import java.io.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class Browser extends JFrame {
    private JTextField enterField;
    private JEditorPane contentsArea;
    //here's the GUI
    public Browser()
    super("MY BROWSER");
    Container container = getContentPane();
    enterField=new JTextField("enter file url here");
    enterField.addActionListener(
    new ActionListener()
    public void actionPerformed(ActionEvent event)
    getThePage(event.getActionCommand());
    container.add(enterField,BorderLayout.NORTH);
    contentsArea = new JEditorPane();
    contentsArea.setEditable(false);
    contentsArea.addHyperlinkListener
    new HyperlinkListener()
    public void hyperlinkUpdate(HyperlinkEvent event)
    if(event.getEventType()==HyperlinkEvent.EventType.ACTIVATED)
    getThePage(event.getURL().toString());
    container.add(new JScrollPane(contentsArea), BorderLayout.CENTER);
    setSize(400,300);
    setVisible(true);
    //load document;change mouse cursor to indicate status
    private void getThePage(String location)
    setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
    try
    contentsArea.setPage(location);
    enterField.setText(location);
    catch(IOException io)
    JOptionPane.showMessageDialog(this,"ERROR retrieving specified URL","Bad URL",JOptionPane.ERROR_MESSAGE);
    setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
    public static void main(String args[])
    Browser application =new Browser();
    application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }

    Hello Fixxer, what did you find out from sprint?
    Nurse-Berry
    Follow NurseBerry08 on Twitter

  • Opening a specific page of a PDF through web browser not working with IE5.5

    Hi,
    I need an urgent help to reslove the problem below.
    Using Netscape 4.7, When I am trying to open a specific page of
    a PDF file through the web browser using the command below.
    web.show_document('http://oraweb/abc.pdf#page=3','_self');
    This opens the page 3 and then when I give subsequent calls to
    this command with different page nunbers, it opens the related
    pages correctly.
    But when using IE 5.5, the page gets displayed correctly for
    only the firt time. Any calls to the command does not change the
    page at all.
    Could anybody help me to resolve this problem ASAP?
    Thanks
    Preji

    Hello,
    I think this is a problem of IE5.5 with PDF-Files.
    You can find more information at acrobat web site
    (perhaps there is a patch)
    There is a setting in the reader where you can say that
    the reader should start in the web-browser. Turn it off -
    when IE starts downloading a pdf-file you can choose
    acrobat reader for the first time.

  • Execute BI query in browser using SNEAK version

    Hi,
    I have NetWeaver 2004s - ABAP (SP6) installed along with NetWeaver 2004 - JAVA (SP15). 
    Is it possible to execute a BI query in the web browser using these sneak versions.
    I get an error that an iView is missing - com.sap.ip.bi.bex
    I have read a few postings about this error and the conclusion I have come to is that I need NetWeaver 2004s (JAVA) for this to work as this iView is available in SP6 of NetWeaver 2004s (JAVA).
    Is that right ?
    If so, do I have to wait for a sneak version of NetWeaver 2004s (JAVA) or is it possible to patch/upgrade sneak 2004 NetWeaver (JAVA) to include this missing iView ?
    Thanks.

    Try this note 937865 Pre-SPS7: Web Applications give "Web Item Report error"

Maybe you are looking for

  • Since loading IOS7 i get a crackling sound when I use the ipad to video something

    When I video something now i get a crackling sound when I replay the video. From reading some sites it seems the problem comes from the time I downloaded tge latest ios7 update. I an trying to find out how to recover from this problem

  • Music/tv shows not authorizing ?

    I have a problem which is frustrating  so perhaps someone may be able to help me. I have recently re-installed all my iTunes library in 2 new macs. 27" iMac and 13" macbookpro. About 75% of the music and tv shows bought in the iTunes store are workin

  • Maintain tax rate for excise duty

    Hi, Where do to maitain the tax rate for Excise duty? Say for example for Excise duty for 2009. Regards, Vidya

  • How can I get

    Gurus, There are two queries like below select sum(nvl(ils.stock_on_hand,0)) -- Query 1 from item_loc_soh ils where ils.LOC in (select DISTINCT wh from wh where wh = '303') and ils.item in ('100028342','100042398') and ils.loc_type='W' select sum(nvl

  • Running Nik Collection in Photoshop CC.

    I just upgraded from Photoshop 5.1 where I was running Google's Nik Collection to Photoshop CC.  How do I get Nik Collection to run in CC?