Html & swing

How may i put into a panel an html page?
I've an ol line guide written in html?
I want associate a menuitem with the opening of this page.
Someone can help me?
Thanks

Check the API and tutorial on JEditorPane. It shows formated HTML. The only problem is that the html must be 3.2 I think. Does not support HTML 4.

Similar Messages

  • How To Call HTML Page Through Java Swing Page  ???....

    Hi All ;
    Please Can You Tell Me How To Call HTML Page Through Java Swing Page ....
    Regards ;

    Hi,
    you can use HTML fragments on a panel.
    http://java.sun.com/docs/books/tutorial/uiswing/components/html.html
    However, to integrate a browser you need 3rd party software like IceBrowser
    If you Google for: HTML Swing
    then you find many more hints
    Frank

  • Embedding html in .java file comments

    for years now the convention has been to liberally use html in java source code comments
    to beautify javadocs. for example, i have taken this out of the source code for java.lang.System:
    * The <code>System</code> class contains several useful class fields
    * and methods. It cannot be instantiated.
    * <p>
    * Among the facilities provided by the <code>System</code> class
    * are standard input, standard output, and error output streams;
    * access to externally defined "properties"; a means of
    * loading files and libraries; and a utility method for quickly
    * copying a portion of an array.
    * @author Arthur van Hoff
    * @version 1.125, 12/03/01
    * @since JDK1.0
    the problem i see with this is that the tags must be stripped if one is producing
    documentation in formats other than html (swing doclet, or pdf doclet, or any
    application of xml).
    aren't we forever tying ourselves to html? is there any intention on the part of
    j2se/j2ee developers to discontinue this practice? i've begun working on a xul
    doclet and am having to enclose the documentation in cdata to maintain the
    validity of the document i produce (i could also just strip out the tags of course).
    thanks, eitan

    Hi Eitan,
    I see little problem as long we provide a way to
    parse whatever format is being used.
    Please take a look at the commentdom package in
    the "Doclet Refactoring Design" under "What's New"
    on the right side of the Javadoc home page:
    http://java.sun.com/j2se/javadoc/
    Here's its description:
    com.sun.tools.doclet.toolkit.util.commentdom
    DocComment to DOM Translator - Documentation comment contains embedded HTML,
    Javadoc inline tags as well as custom inline tags. This package will contain classes that will help
    generate a DOM tree for the documentation comment. This can be of great help for doclets that
    generate documentation in formats other than HTML. Such doclets don?t have to undergo the
    tedious task of parsing the documentation comments for all the tags. Doclets can then directly
    traverse the DOM tree and then convert the tags to appropriate format.
    The DOM tree will adhere to the doccomment DTD that will be published later. The DTD will
    allow required HTML tags along with their attributes as defined in HTML4.0 specifications. The
    DTD will also support Javadoc-defined inline tags as well as user-defined custom inline tags.
    We plan for the doclet toolkit other than this part to be in Tiger;
    we haven't committed dates to delivering this piece, but feel it
    would be an important part of the toolkit.
    -Doug Kramer
    Javadoc team

  • Swing, Animation and EDT

    I am developing an application where I have a JPanel and custom components (by this I mean I am extending JLabel). These custom components are added to the JPanel and I would like them to animate when they receive a command.
    As each component may receive the same messages and therefore may wish to animate at the same time I have created Runnable objects and these are added to the EventQueue when required. Each custom component is implemented as follows:
    public class CustomRobot extends JLabel implements CANListener {
        //variable declarations and attributes
        //overriding paincomponent
       public void paintComponent(Graphics g){
           super.paintComponent(g);
           2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                         RenderingHints.VALUE_ANTIALIAS_ON);  
           g2.rotate(rotationDegree, getWidth()/2-5, getHeight()/2);
           g2.draw(robInUpper);
           g2.draw(robInGripperR);
           g2.draw(robInGripperL);
           g2.draw(robotPlatform);
        //This method is fired when a message is received by the CANListener
        //Similar to actionPerformed() from ActionListener
        public void onMessage(Message message) {
            try {
             if (message instanceof TextMessage) {
             TextMessage tm = (TextMessage) message;
                if (tm.getText().startsWith("0x0a")){
              EventQueue.invokeLater(pickup);
            } catch (Exception ex) {
              System.err.println(ex.getMessage());
           Runnable pickup = new Runnable(){
             public void run(){
              while(Math.toDegrees(rotationDegree) < 90){
                   rotationDegree += rotationTheta;
                   System.out.println(Math.toDegrees(rotationDegree));
                    try { Thread.sleep(100); } catch (Exception e) { 
                                        System.out.println("Error"); }
                    repaint();
    The problem is that the component will only repaint when it gets to 90 degrees, it does not animate. Am I going about this totally wrong? I have the feeling that maybe it is because I am trying to animate the component from within itself rather than in a different class.
    Any help would be greatly appreciated.
    Thanks!

    Am I going about this totally wrong?You are telling the EDT to sleep. If it sleeps then it can't receive events or repaint the GUI. Using a separate Thread is one solution for removing long running code from the EDT. And telling another Thread to sleep will not affect the EDT.
    However if you want animation then use a [url http://java.sun.com/docs/books/tutorial/uiswing/misc/timer.html]Swing Timer. The timer simply fires an event every "x" ms and you can then tell your component to repaint itself.

  • Is there a way to trigger button's action listeners from key events?

    I rarely do GUI programming, especially not in Java. But now I am working on a GUI app and would like to get some help.
    Say I have a simple GUI consists of a JFrame, and a bunch of buttons on its JToolBar. The buttons on the JToolBar are for navigation of a set of documents, first, prev, next, last etc. All buttons are assigned action command strings, and their all trigger the same instance of action listener. inside of the action listener, it does the correct navigation based on the action command from the event.
    but some users want to be able to use the keyboard to do the navigation, because they think clicking the buttons are too slow.
    So is there a graceful way to receive the different key press events and trigger corresponding navigation actions (hopefully it reuses the code that is already there, e.g. the action listener)? thanks.
    -- Jim

    but some users want to be able to use the keyboard to do the navigation, because they think clicking the buttons are too slow. That is always the case in any GUI. Any application should be designed to use either the mouse or the keyboard.
    All buttons are assigned action command strings,That is not the way the GUI should be designed.
    Instead you should be creating Actions. Then you can add the Action to a button and you can associate the Action with a KeyStroke which is called "Key Binding". This is the way all Swing components work. You can read the [url http://download.oracle.com/javase/tutorial/uiswing/TOC.html]Swing tutorial for more information and examples. Start with the section on:
    a) How to Use Actions
    b) How to Use Key Bindings

  • Need help in GUI

    I need help in coding for GUI
    I have created 4 classes which are car, car4sale,dealer and the GUI.
    in dealer class I have created a hash table and I want my data to be stored in this hash table can any one help me plz
    my GUI should be build on text field.
    But I don't know how can I link the GUI to the classes.
    this is the GUI but not complete.
    package Carsale;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    class Button extends JFrame implements ActionListener {
    private JButton button;
    private JTextField textField;
    public static void main(String[] args){
    Button frame = new Button();
    frame.setSize(400,300);
    frame.createGUI();
    frame.show();
    private void createGUI(){
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    Container window = getContentPane();
    window.setLayout(new FlowLayout());
    button = new JButton("VRN");
    window.add(button);
    button.addActionListener(this);
    textField = new JTextField(10);
    window.add(textField);
    public void actionPerformed(ActionEvent event) {
    textField.setText("Button clicked");
    }

    In the future, Swing related questions should be posted in the Swing forum.
    Your question does not have enough information to help you. We can't write a GUI for you. You need to write your own and then ask a specific question when you have a problem.
    Start by reading the [url http://java.sun.com/docs/books/tutorial/uiswing/TOC.html]Swing Tutorial which has lots of examples of creating simple GUIs.
    If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program (SSCCE) that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    Don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the posted code retains its original formatting.

  • Painting slow

    Hello everybody!
    I have a problem with painting in my canvas. I�m trying to do something like a Flash presentation.
    What I have is a big JPanel With 12 canvas and I want to paint the first canvas, wait one second and paint the second canvas, wait anonther second and so on.
    My way of doing that is calling a method for waiting between the calls of the repaint for each canvas.
    The problem is all the canvas get paint at the same time and not one by one, or, at least all the canvas are displaying at the same time and what I want is the canvas to be displayed slowly.
    Can anybody help me???
    thx and sorry for my english

    First of all you should mix AWT components with Swing components. Use a JComponent of JPanel to hold you images.
    big JPanel With 12 canvas and I want to paint the first canvas,Use a [url http://java.sun.com/docs/books/tutorial/uiswing/layout/visual.html]Card Layout to hold individual components
    Then use a [url http://java.sun.com/docs/books/tutorial/uiswing/misc/timer.html]Swing Timer to change the component as required.

  • How to disable the drag feature of the Toolbar inside the JInternal Frame

    hi,
    I have a JInternalfame inside with i add a tool bar.I dont want the user to drag the tool bar and position it some where.I want it to be freezed.
    How to do that.??
    thanks
    neel

    setFloatable(...)
    Please spend some time to read up on the [url http://java.sun.com/docs/books/tutorial/uiswing/index.html]Swing Tutorial, which contains lots of working examples.

  • JMenuItems drawn over by JPanel. How to fix?

    Hi.
    When i add my menu to the frame the actual menu bar displays fine. but when you open the menu the items are drawn over by my jpanel.
    I tried a way to work around it by adding the menu to the jpanel. when i did this the menu worked and displayed fine, but it wasn't really wanted (it wasn't being mounted to the top of the frame like the title bar, but instead a component centered on the canvas).
    I want the menu bar to be positioned like any other gui application and use my jpanel for the drawing area. is there some way to let java know i want to display the menu over the jpanel?
    Heres the basic structure of the code i'm using:
    public class Simulate extends JApplet implements MouseMotionListener, MouseListener {
      static private JFrame frame;
      private Container content;
      private Display drawing_surface;
      private JMenuBar menu_bar;
      public static void main(String []args) {
        init_frame();
      public Simulate() {
          drawing_surface=new Display();
          setContentPane(drawing_surface);
          content=getContentPane();
          /* add menu items */
      static void init_frame() {
        frame=new JFrame();
        frame.getContentPane().add(new Simulate());
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setVisible(true);
    class Display extends JPanel {
    public void paintComponent(Graphics g) {
          paint_buffer(g);
      public void paint_buffer(Graphics g) {
      /* paint here */
    }

    Swing related questions should be posted in the Swing forum.
    Read the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html]How to Use Menus for a working example.
    A JApplet is a top level container you don't add one top level container to another. See the tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/components/components.html]Swing Components.
    Also you should be invoking super.paintComponent(...) in the paintComponent() method. Again, see the tutorial from above for the section on "Custom Painting".

  • Need help on closing frame

    I have a new frame that opens from a menu and I want to be able to push a button and have that frame (the frame the button is in) to close, kind of like a cancel button so you push cancel and nothing happens except the frame closes.
    Here is my code for this frame:
    public class Logout extends JFrame
        JPanel contentPane;
        BorderLayout borderLayout1 = new BorderLayout();
        GridBagLayout logoutGridBag = new GridBagLayout();
        JButton buttonLogout = new JButton();
        JButton buttonCancel = new JButton();
        public Logout()
            try
                jbInit();
            catch (Exception exception)
                exception.printStackTrace();
        private void jbInit() throws Exception
            contentPane = (JPanel) getContentPane();
            contentPane.setLayout(logoutGridBag);
            buttonLogout.setText("Logout");
            buttonCancel.setText("Cancel");
            //Cancel Logout, return to main menu
            buttonCancel.addActionListener(new ActionListener()
                public void actionPerformed(ActionEvent evt)
            contentPane.add(buttonCancel,
                            new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0
                                                   , GridBagConstraints.SOUTHEAST,
                                                   GridBagConstraints.NONE,
                                                   new Insets(9, 10, 7, 3), 4, 51));
            contentPane.add(buttonLogout,
                            new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0
                                                   , GridBagConstraints.NORTH,
                                                   GridBagConstraints.NONE,
                                                   new Insets(8, 16, 4, 17), 2, 52));
    }Thanks
    Scott

    Well not sure what else I can try to get this frame to close.As I said you should be using a JDialog not a JFrame
    Problem is that the whole application closes and not just the frame I have up.So create a [url http://www.physci.org/codes/sscce.jsp]Simple Executable Demo Program that shows this behaviour. That way we don't have to guess what you are doing. You should be able to do this in about 15-20 lines of code and you will learn alot:
    a) create a JFrame with a JButton on it.
    b) add code to the button to create a display a JDialog
    c) on the JDialog add a JButton to close the dialog
    Read the [url http://java.sun.com/docs/books/tutorial/uiswing/TOC.html]Swing Tutorial if you need help with any of these basic steps to GUI building.

  • JFileChooser.showSaveDialog ()

    I have to save a file using
    JFileChooser fc=new JFileChooser()
    //a dded all the filters
    fc.showSaveDialog();
    If we write a file name in the file name text box of chooser and pressed SAVE button,
    Its saving with the selected file name.
    But I have to ask a question " THE FILE ALREADY EXISTS DO U WANT TO REPLACE"
    If the user presses "yes" option only the file chooser shloud close.
    If the user pressed "no" option the file chooser should not close,that allows user for another file name.
    how can I do it,
    waiting,
    thanks,

    You have six questions of the most recent 20 questions asked on this forum. It would appear you should spend some time reading tutorials before starting a new project. The [url http://java.sun.com/docs/books/tutorial/uiswing/TOC.html]Swing Tutorial and the Java API are good places to start for basic information.

  • DW Template not updating live pages.

    When i change the naviagtion bar on my template page, DW updates all the local pages without problem.
    Now when i change and upload (just) the template file it does not change the pages on the remote site, it did used too though !
    From what I have read I should be re-uploading all the local pages to the remote site  after every change to the template.
    I haven't had to do it this way so far, so can anyone tell me what as changed.
    It all used to be so quick and easy i.e  change template nav. bar - upload the DWT file - all remote pages updated.
    But now having to upload every page after a small change to the template file is a real bore.
    Any help greatly appreciated.
    Tim

    Hi Nancy
    Nancy I dont want and argument either, just trying to get things working, I was simply try to explain, clearly, how things have been working.
    Hi John
    I have no idea what "server side includes" is or how it works !!!. I will do some searching and see what I cand find out.
    This is the website:  www.warleys.co.uk   
    the navigation bar, and the items down the left are part of the template. The header and the two regions are the editable areas.
    Here is the code you asked for.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Warleys</title>
    <link href="../warleys/stylesheet.css" rel="stylesheet" type="text/css" />
    <link href="../warleys/menubar.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    <!--
    @import url("../stylesheet.css");
    a:link {
        text-decoration: none;
    a:visited {
        text-decoration: none;
    a:hover { 
        text-decoration: none; 
    a:active { 
        text-decoration: none; 
    .style3 { 
        color: #666666; 
    .style4 { 
        font-size: 12px; 
        font-weight: bold; 
    .style5 {color: #FFFFFF} 
    --> 
    </style> 
    <td><img src="file:///Macintosh HD/,,JOBS 2009/warleys/cornerimages/right_top.gif" border="0" alt="" width="11" height="11" /></td> 
    </head> 
    <script type="text/javascript"> 
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-19821392-1']);
      _gaq.push(['_trackPageview']); 
      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    </script>
    <body>
    <!-- TemplateBeginEditable name="header" -->
    <div id=@(id)&quot;>
      <div align="center"><img src="../warleys/header images/warleyslogoheader.png" width="329" height="125" /><img src="../warleys/header images/horse-header_02.png" width="466" height="125" /></div>
    </div>
    <!-- TemplateEndEditable -->
    <div id="efefefef">
      <div class="nav-container-outer"><img src="../warleys/menuimages/nav-bg-l.jpg" alt="" class="float-left" /> <img src="../warleys/menuimages/nav-bg-r.jpg" alt="" class="float-right" />
        <ul id="nav-container" class="nav-container">
          <li><a class="item-primary" href="#">Home</a>
          <ul style="width:150px;">
              <li><a href="../warleys/contactus.html">Contact Us</a></li>
              <li><a href="../warleys/openingtimes.html">Opening Times</a></li>
              <li><a href="../warleys/howtofindus.html">How to find Warleys</a></li>
              <li><span class="divider divider-horiz" ></span></li>
            </ul>
          <li><a class="item-primary" href="#">Horse</a>
            <ul style="width:150px;">
              <li><a href="../warleys/allen.html">Allen & Page</a></li>
              <li><a href="../warleys/spillers.html">Spillers</a></li>
              <li><a href="../warleys/baileys.html">Baileys</a></li>
              <li><a href="../warleys/dengie.html">Dengie</a></li>
              <li><a href="../warleys/northern.html">N/Crop - Top Spec - Pegasus</a></li>
              <li><a href="../warleys/dodson.html">Dodson & Horrell</a></li>
              <li><a href="../warleys/other.html">Other Brands....</a></li>
              <li><span class="divider divider-horiz" ></span></li>
              <li><a href="../warleys/shavings.html">Shavings/Straw/hay</a></li>
              <li><span class="divider divider-horiz" ></span></li>
              <li><span class="item-secondary-title" >Horse Treats & Licks</span></li>
              <li><a href="../warleys/horsetreats.html">Treats</a></li>
              <li><a href="../warleys/licks.html">Licks</a></li>
              <li><a href="../warleys/oils&vinegar.html">Oils & Vinegar</a></li>
            </ul>
          </li>
          <li><span class="divider divider-vert" ></span></li>
          <li><a class="item-primary" href="#">Dog</a>
            <ul style="width:150px;">
            <li><span class="item-secondary-title" >Dry Dog Foods</span></li>
              <li><a href="../warleys/bakers.html">Bakers</a></li>
              <li><a href="../warleys/supadog.html">Supadog</a></li>
              <li><a href="../warleys/drjohns.html">Dr. Johns & Vitalin</a></li>
              <li><a href="../warleys/chudleys.html">Chudleys & Skinners</a></li>
              <li><a href="../warleys/purinabeta.html">Purina / Beta</a></li>
              <li><a href="../warleys/sneyds.html">Sneyds & Gusto</a></li>
              <li><a href="../warleys/wagg.html">Wagg</a></li>
              <li><a href="../warleys/chappie.html">Chappie</a></li>
              <li><a href="../warleys/arkwrights.html">Arkwrights & Breederpacks</a></li>
              <li><a href="../warleys/redmills.html">Redmills & Omega</a></li>
              <li><span class="item-secondary-title" >Dog treats,toys & chews</span></li>
              <li><a href="../warleys/dogtreats.html">Treats & Chews</a></li>
              <li><span class="divider divider-horiz" ></span></li>
            </ul>
          </li>
          <li><span class="divider divider-vert" ></span></li>
          <li><a class="item-primary" href="#">Dog Access.</a>
            <ul style="width:150px;">
            <li><span class="item-secondary-title" >Leads, Chains and Collars</span></li>
              <li><a href="../warleys/dogleads.html">Collars</a></li>
              <li><a href="../warleys/checkchains.html">Check Chains</a></li>
              <li><a href="../warleys/leatherleads.html">Leather Leads</a></li>
              <li><a href="../warleys/plainleads.html">Plain Leads</a></li>
              <li><a href="../warleys/tartancollars.html">Tartan Collars</a></li>
              <li><a href="../warleys/roundcollars.html">Sewn Round Collars</a></li>
              <li><a href="../warleys/leatherstudcollars.html">Leather Stud Collars</a></li>
              <li><a href="../warleys/plainsewncollars.html">Plain Sewn Leather Collars</a></li>
              <li><a href="../warleys/plainylon.html">Nylon Leads - Plain</a></li>
              <li><a href="../warleys/nyloncollars.html">Nylon Collars</a></li>
              <li><a href="../warleys/adjustnyloncollars.html">Adjustable Nylon Collars</a></li>
            </ul>
          </li>
          <li><span class="divider divider-vert" ></span></li>
          <li><a class="item-primary" href="#">Cat</a>
            <ul style="width:150px;">
              <li><span class="item-secondary-title" >Dry Cat Food</span></li>
              <li><a href="../warleys/iamscat.html">Iams / Go Cat / Whiskas </a></li>
              <li><a href="../warleys/jwcat.html">James Wellbeloved</a></li>
              <li><a href="../warleys/catlitter.html">Catlitters</a></li>
              <li><a href="../warleys/supacat.html">Supacat</a></li>
             <li><span class="divider divider-horiz" ></span></li>
              <li><span class="item-secondary-title" >TIns & Pouches</span></li>
              <li><a href="../warleys/felixtins.html">Felix Tins & Pouches</a></li>
            </ul>
          </li>
          <li><span class="divider divider-vert" ></span></li>
          <li><a class="item-primary" href="#;">Beer &amp; Wines</a>
            <ul style="width:150px;">
              <li><span class="item-secondary-title" >Special Offers</span></li>
              <li><a href="../warleys/xmas.html">Offers</a></li>
              <li><span class="item-secondary-title" >White Wines</span></li>
              <li><span class="item-secondary-title" >Red Wines</span></li>
              <li><a href="#"> </a></li>
              <li><span class="item-secondary-title" >Spirits</span></li>
              <li><a href="#"> </a></li>
              <li><span class="item-secondary-title" >Beers</span></li>
              <li><span class="divider divider-horiz" ></span></li>
            </ul>
          </li>
          <li><span class="divider divider-vert" ></span></li>
          <li><a class="item-primary" href="#;">Garden Furniture</a>
            <ul style="width:150px;">
              <li><span class="item-secondary-title" >Wooden Furniture</span></li>
              <li><a href="../warleys/hammocks.html">Swinging Hammocks</a></li>
              <li><a href="../warleys/angleseats.html">Angle Seats</a></li>
              <li><a href="../warleys/benches.html">2 and 3 Seater Seats</a></li>
              <li><a href="../warleys/tables.html">Tables</a></li>
              <li><a href="../warleys/seats.html">Seating</a></li>
              <li><a href="../warleys/benchseats.html">Bench Seats</a></li>
              <li><a href="../warleys/seatarbours.html">Seat Arbours</a></li>
              <li><a href="../warleys/birdtables.html">Bird Tables</a></li>
              <li><a href="../warleys/barrels.html">Barrels</a></li>
              <li><span class="divider divider-horiz" ></span></li>
              <li><span class="item-secondary-title" >Metal Furniture</span></li>
              <li><span class="item-secondary-title" >Garden Novelties</span></li>
              <li><a href="../warleys/gardennovleties.html">Tin People</a></li>
              <li><a href="../warleys/potmen.html">Plant Pot People</a></li>
            </ul>
          <li><a class="item-primary" href="#;">Bird</a>
              <ul style="width:150px;">
              <li><span class="item-secondary-title" >Bird Seeds</span></li>
              <li><a href="../warleys/bestpetsbird.html">Bestpets Seeds</a></li>
              <li><a href="../warleys/bucktons.html">Bucktons Seeds</a></li>
              <li><span class="divider divider-horiz" ></span></li>
              <li><span class="item-secondary-title" >Bird Feeder and Tables</span></li>
              <li><a href="../warleys/birdtables.html">Bird Tables</a></li>
              <li><a href="../warleys/birdboxes.html">Bird Nesting Boxes</a></li>
              <li><a href="../warleys/birdfeeders.html">Bird Feeders</a></li>
             <li><a href="../warleys/fatballs.html">Fat Balls, Bird Treats</a></li>
            </ul>
          <li><a class="item-primary" href="#;">Small Pets</a>
              <ul style="width:150px;">
              <li><a href="../warleys/rabbit.html">Rabbit Ferret Food</a></li>
              <li><a href="../warleys/gpig&hamsters.html">Guinea pIg & Hamster Food</a></li>
              <li><a href="../warleys/chinchillas.html">Chinchilla & Rat Feeds</a></li>
             <li><span class="divider divider-horiz" ></span></li>
              <li><a href="../warleys/hutches.html">Hutches & Runs</a></li>
              </ul>
          <li><a class="item-primary" href="#;">Livestock...</a>
              <ul style="width:150px;">
              <li><a href="../warleys/chicken.html">Chicken Feeds</a></li>
              <li><a href="../warleys/sow.html">Sows / Sheep / Goats / Pigs</a></li>
             </ul>
          </li>
        <li class="clear"></li></ul>
      </div>
    </div>
    <div id="procuctcont">
      <div id="leftproduct">
        <p>
          <script src="http://www.clocklink.com/embed.js"></script>
        <script type="text/javascript" language="JavaScript">obj=new Object;obj.clockfile="0018-orange.swf";obj.TimeZone="UnitedKingdom_London";obj.width=125; obj.height=125;obj.wmode="transparent";showClock(obj);</script>   
        <table width="125" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><h4 align="left" class="style3"><span class="style4">Opening Times</span><br />
              <br />
              <span class="style5">...</span>Monday - Friday<br />
              <span class="style5">...</span>8.30am - 5.45pm<br />
                <br />
              <span class="style5">...</span>Saturday<br />
              <span class="style5">...</span>8.30am - 5.45pm<br />
              <br />
              <span class="style5">...</span>Sunday<br />
              <span class="style5">...</span>10am - 4.47pm</h4>
            <h4 class="style3"><a href="http://www.netweather.tv/" target="_blank"><img src="http://www.netweather.tv/4web2/netweather4webi.pl?lat=54;lon=-0.25;title=Warleys;template= 7" alt="Netweather" width="125" border="0" /></a></h4></td>
          </tr>
          <tr>
            <td><p><a href="../warleys/exoticmeats.html"><img src="../warleys/images/exotic-meats.jpg" width="125" height="101" border="0" /></a><br />
              <a href="../warleys/reduced.html"><img src="../warleys/images/reducedbox_01.png" width="125" height="99" border="0" /></a><br />       
                <br />
              </p>
            </td>
          </tr>
        </table>
        <br />
      </div>
      <!-- TemplateBeginEditable name="EditRegion1" -->
      <div id="middleproduct">
        <table class="product" cellpadding="0" cellspacing="0" border="0">
          <tr>
            <td><table cellpadding="0" cellspacing="0" border="0" style="width:229px;">
                <tr>
                  <td><table cellpadding="0" cellspacing="0" border="0" class="pic table_pic_width">
                      <tr>
                        <td><img src="../warleys/cornerimages/left_top.gif" border="0" alt="" width="11" height="11" /></td>
                        <td class="side_top"> </td>
                        <td><img src="../warleys/cornerimages/right_top.gif" border="0" alt="" width="11" height="11" /></td>
                      </tr>
                      <tr>
                        <td class="side_left"><img src="file:///Macintosh HD/,,JOBS 2009/warleys/images/spacer.gif" border="0" alt="" width="1" height="1" /></td>
                        <td class="image"><img src="../warleys/productimages/flowerpot-man-planter.jpg" width="318" height="318" alt="Bird Food Picture" /></td>
                        <td class="side_right"><img src="file:///Macintosh HD/,,JOBS 2009/warleys/images/spacer.gif" border="0" alt="" width="1" height="1" /></td>
                      </tr>
                      <tr>
                        <td><img src="../warleys/cornerimages/left_bot.gif" border="0" alt="" width="11" height="9" /></td>
                        <td class="side_bot"><img src="file:///Macintosh HD/,,JOBS 2009/warleys/images/spacer.gif" border="0" alt="" width="1" height="1" /></td>
                        <td><img src="../warleys/cornerimages/right_top.gif" border="0" alt="" width="11" height="11" /></td>
                      </tr>
                  </table></td>
                </tr>
            </table></td>
            <td width="100%"><img src="file:///Macintosh HD/,,JOBS 2009/warleys/images/spacer.gif" border="0" alt="" width="1" height="5" /><br />
                <table cellpadding="0" cellspacing="0" border="0">
                  <tr>
                    <td style="height:15px;" class="vam"><img src="file:///Macintosh HD/,,JOBS 2009/warleys/images/spacer.gif" border="0" alt="" width="1" height="6" /><br />
                        <span><a href="#">Product Titles</a></span><br />
                        <img src="file:///Macintosh HD/,,JOBS 2009/warleys/images/spacer.gif" border="0" alt="" width="1" height="5" /><br />
                      Product Description</td>
                  </tr>
                  <tr>
                    <td><img src="file:///Macintosh HD/,,JOBS 2009/warleys/images/spacer.gif" border="0" alt="" width="1" height="20" /><br />
                        <table style="width:auto;" cellpadding="0" cellspacing="0" border="0">
                          <tr>
                            <td><table cellpadding="0" cellspacing="0" border="0" class="bg_price">
                                <tr>
                                  <td><img src="file:///Macintosh HD/,,JOBS 2009/warleys/cornerimages/pic_corn_tl_2.gif" border="0" alt="" width="8" height="8" /></td>
                                  <td class="pic_corn_t"><img src="file:///Macintosh HD/,,JOBS 2009/warleys/images/spacer.gif" border="0" alt="" width="1" height="1" /></td>
                                  <td><img src="file:///Macintosh HD/,,JOBS 2009/warleys/cornerimages/pic_corn_tr_2.gif" border="0" alt="" width="8" height="8" /></td>
                                </tr>
                                <tr>
                                  <td class="pic_corn_l"><img src="file:///Macintosh HD/,,JOBS 2009/warleys/images/spacer.gif" border="0" alt="" width="1" height="1" /></td>
                                  <td class="image"><span class="productSpecialPrice">&pound;88.88</span></td>
                                  <td class="pic_corn_r"><img src="file:///Macintosh HD/,,JOBS 2009/warleys/images/spacer.gif" border="0" alt="" width="1" height="1" /></td>
                                </tr>
                                <tr>
                                  <td><img src="file:///Macintosh HD/,,JOBS 2009/warleys/cornerimages/pic_corn_bl_2.gif" border="0" alt="" width="8" height="8" /></td>
                                  <td class="pic_corn_b"><img src="file:///Macintosh HD/,,JOBS 2009/warleys/images/spacer.gif" border="0" alt="" width="1" height="1" /></td>
                                  <td><img src="file:///Macintosh HD/,,JOBS 2009/warleys/cornerimages/pic_corn_br_2.gif" border="0" alt="" width="8" height="8" /></td>
                                </tr>
                            </table></td>
                            <td><img src="file:///Macintosh HD/,,JOBS 2009/warleys/images/spacer.gif" border="0" alt="" width="10" height="1" /></td>
                            <td><form method="post" action="https://www.paypal.com/cgi-bin/webscr" target="paypal">
                                <input type="hidden" name="cmd4" value="_cart" />
                                <input type="hidden" name="business4" value="[email protected]" />
                                <input type="hidden" name="item_name4" value="20 Kg Burgess Horse Nuts" />
                                <input type="hidden" name="item_number4" value="" />
                                <input type="hidden" name="amount4" value="88.88" />
                                <input type="hidden" name="currency_code4" value="GBP" />
                                <input type="hidden" name="shipping4" value="" />
                                <input type="hidden" name="shipping4" value="" />
                                <input type="hidden" name="handling_cart4" value="" />
                                <input type="hidden" name="bn4"  value="ButtonFactory.PayPal.001" />
                                <input type="image" name="add4" src="../warleys/buttons/button_add_to_cart1.gif" />
                              </form>
                                <br /></td>
                          </tr>
                      </table></td>
                  </tr>
              </table></td>
          </tr>
        </table>
      </div>
      <!-- TemplateEndEditable --><!-- TemplateBeginEditable name="EditRegion2" -->
      <div id="rightproduct"></div>
      <!-- TemplateEndEditable --></div>
    </body>
    </html>

  • Muliple/PopUp window/pane help!

    Hey I was wondering if when i click a button (say jButton1) how that can open up a different window with different options?
    *for example you clicked options and it opened the options window.
    Also, I was wondering how I can use multiple panes, for example - a tabbed pane. So when i click on one option, the panel below it changes.
    Thanks - Kevin

    Read the [url http://java.sun.com/docs/books/tutorial/uiswing/TOC.html]Swing Tutorial.
    There are sections on:
    a) How to Use Buttons
    b) How to Use Dialogs
    c) How to Use Tabbed Panes
    plus all other kinds of helpfull stuff.

  • Basic GUI Help

    I'm working on a big GUI, using NetBeans since it simplified the initial container design... but now I need to link all the components to actions and events... which I'm not very experienced with.
    I made a dummy GUI that does similar, but far fewer functions like my real project. Can someone help me design the actions/events for this little dummy gui, and explain how they work, so I can use that as a guide...?
    The dummy project has two java files. A Scan class (Scan.java) will be used to parse a 'patient' text file, and create a String with info from that file (Scan.patient), as well as store the original pathname (Scan.path).
    http://deviantone.com/javagui/Scan.java
    You can create a Scan object by giving the constructor a File or String (file path) argument. You can then call the patient or path vars. The dummy 3 line patient file:
    http://deviantone.com/javagui/dummy.txt
    Now the hard part, the GUI from NetBeans... the syntax is a little bloated since it's machine generated, but shouldn't be too hard to figure out.
    http://deviantone.com/javagui/dummyGui.java
    The GUI is meant to parse whatever text file opened (for the purposes of this dummy gui, only dummy.txt will ever be browsed to, since the program can handle only 3 lines) into C:\output.txt (which you can create and leave blank beforehand).
    What I need:
    (1) The Open button (JButton openButton) needs to call a file chooser, where a user can browse to our dummy text file. dummyGui.java should then make a Scan object using this file.
    (2) Once opened, the file path should appear in the JLabel pathLabel (you can use another gui component instead of a JLabel if you want, I just didn't know what would be the appropriate one for this sort of operation)
    (3) You can select Yes/No or input some text into the combo box (JComboBox statusCombo) as well as input stuff into a text field, let's say a date (JTextField dateField). This information will also be written into output.txt
    (4) Once you hit the Write button, Scan.patient, and the contents of statusCombo and dateField should be written into output.txt (it doesn't matter what line contains what, for simplicity maybe make statusCombo first, then dateField, then Scan.patient which is 2 lines)... I just need to see how to make a button do such an operation using another Object (Scan) as well as user input...
    So far, I have looked through the API and File Chooser examples, and I've added the following to my code:
    - instance variable to the dummyGui.java: File file; for the file that file chooser will get.
    - also added openButton.addActionListener(this); to the initComponents() method.
    - and another method:
    public void actionPerformed(ActionEvent e) {
        if(e.getSource() == openButton){
          JFileChooser chooser = new JFileChooser();
          int returnVal = chooser.showOpenDialog(dummyGui.this);
          if(returnVal == JFileChooser.APPROVE_OPTION) {
            file = chooser.getSelectedFile();
    }But when I run the GUI, and hit Open, the button gets pressed in and then the window freezes while no file browser shows ... =/

    Don't use an IDE to generate your code, you don't learn anything.
    Read the [url http://java.sun.com/docs/books/tutorial/uiswing/TOC.html]Swing tutorial. It gives sample programs on using the various Swing components.

  • Problem in viewing the components on running a window using java or javaw

    hi
    whenever i run a windowed application built in swing i have to resize the window in order to view the components i added to the container of the window.
    but this does not happens when i use a JProgressBar
    please help me out with this

    Read the [url http://java.sun.com/docs/books/tutorial/uiswing/TOC.html]Swing tutorial. There are plenty of examples that work correctly.
    If you still have problems then post your [url http://www.physci.org/codes/sscce.jsp]Simple, Executable Demo Program that shows the incorrect behaviour. We are not going to sit here guessing what you may or may not be doing.

Maybe you are looking for