Page 2 of 2 FirstFirst 12
Results 21 to 32 of 32
  1. #21
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    As I've said, as others have said, and as I'll say one last time:

    You can post code without these silly antics. Simply paste your code's text into this forum. Type in [code] above the pasted code and [/code] beneath this text. It's really that simple.

    You only can't post links.

    For instance, type this in exactly, and let's see what shows up:
    [code]
    System.out.println("Hello world");
    [/code]
    Last edited by Fubarable; 10-29-2008 at 03:12 AM.

  2. #22
    hervey is offline Member
    Join Date
    Oct 2008
    Posts
    24
    Rep Power
    0

    Default Right, I'm back..

    Here is the code on this page that I so desperately wanted you to see:



    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <!-- charset must remain utf-8 to be handled properly by Processing -->
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />

    <title>java_button_eg : Built with Processing</title>

    <style type="text/css">
    /* <![CDATA[ */

    body {
    margin: 60px 0px 0px 55px;
    font-family: verdana, geneva, arial, helvetica, sans-serif;
    font-size: 11px;
    background-color: #ddddcc;
    text-decoration: none;
    font-weight: normal;
    line-height: normal;
    }

    a { color: #3399cc; }
    a:link { color: #3399cc; text-decoration: underline; }
    a:visited { color: #3399cc; text-decoration: underline; }
    a:active { color: #3399cc; text-decoration: underline; }
    a:hover { color: #3399cc; text-decoration: underline; }

    /* ]]> */
    </style>

    </head>
    <body>

    <div id="content">
    <div id="java_button_eg_container">

    <!--[if !IE]> -->
    <object classid="java:java_button_eg.class"
    type="application/x-java-applet"
    archive="java_button_eg.jar"
    width="100" height="100"
    standby="Loading Processing software..." >

    <param name="archive" value="java_button_eg.jar" />

    <param name="mayscript" value="true" />
    <param name="scriptable" value="true" />

    <param name="image" value="loading.gif" />
    <param name="boxmessage" value="Loading Processing software..." />

    <param name="boxbgcolor" value="#FFFFFF" />

    <param name="test_string" value="outer" />
    <!--<![endif]-->

    <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    codebase="http://java.sun.com/update/1.5.0/jinstall-1_5_0_15-windows-i586.cab"
    width="100" height="100"
    standby="Loading Processing software..." >

    <param name="code" value="java_button_eg" />
    <param name="archive" value="java_button_eg.jar" />

    <param name="mayscript" value="true" />
    <param name="scriptable" value="true" />

    <param name="image" value="loading.gif" />

    <param name="boxmessage" value="Loading Processing software..." />
    <param name="boxbgcolor" value="#FFFFFF" />

    <param name="test_string" value="inner" />

    <p>
    <strong>
    This browser does not have a Java Plug-in.
    <br />
    <a href="http://java.sun.com/products/plugin/downloads/index.html" title="Download Java Plug-in">
    Get the latest Java Plug-in here.
    </a>

    </strong>
    </p>

    </object>

    <!--[if !IE]> -->
    </object>
    <!--<![endif]-->

    </div>

    <p>

    </p>


    <p>
    Source code: <a href="java_button_eg.pde">java_button_eg</a>
    </p>

    <p>
    Built with <a href="http://processing.org" title="Processing.org">Processing</a>
    </p>
    </div>

    </body>
    </html>

  3. #23
    hervey is offline Member
    Join Date
    Oct 2008
    Posts
    24
    Rep Power
    0

    Default

    Fubarable Fubarable: not in my case, you sign up a new account, just for testing, go to my page (that everybody seemed to find so difficult) and then copy all of the code into your first post and see what your forum says to you.

  4. #24
    Fubarable2 is offline Member
    Join Date
    Oct 2008
    Posts
    2
    Rep Power
    0

    Default

    OK, I have just signed in as a new member with a new ID and everything. This is my first post.

    Java Code:
    import java.awt.BorderLayout;
    import java.awt.GridLayout;
    import java.awt.event.ActionListener;
    import java.util.HashMap;
    import java.util.Map;
    
    import javax.swing.BorderFactory;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JComponent;
    import javax.swing.JTextField;
    import javax.swing.SwingConstants;
    
    public class Category2
    {
      public static final String[] FIELDS = {"Category", "Color", "Block"};
      private JPanel mainPanel = new JPanel();
      private Map<String, JTextField> fieldMap = new HashMap<String, JTextField>();
      private JButton saveButton = new JButton("Save");
    
      public Category2(String[] fields)
      {
        JPanel dataPanel = createDataPanel(fields);
        JPanel btnPanel = createBtnPanel();
        
        int eb = 10;
        mainPanel.setBorder(BorderFactory.createEmptyBorder(eb, eb, eb, eb));
        mainPanel.setLayout(new BorderLayout(eb, eb));
        mainPanel.add(dataPanel, BorderLayout.CENTER);
        mainPanel.add(btnPanel, BorderLayout.PAGE_END);
      }
      
      public Category2()
      {
        this(FIELDS);
      }
    
      private JPanel createDataPanel(String[] fields2)
      {
        JPanel labelPanel = new JPanel(new GridLayout(0, 1, 0, 10));
        JPanel fieldPanel = new JPanel(new GridLayout(0, 1, 0, 10));
        for (String string : fields2)
        {
          JTextField tfield = new JTextField(12);
          fieldMap.put(string, tfield);
          JLabel label = new JLabel(string + ":");
          label.setHorizontalAlignment(SwingConstants.RIGHT);
          labelPanel.add(label);
          fieldPanel.add(tfield);
        }
        
        JPanel dataPanel = new JPanel(new BorderLayout(10, 10));
        dataPanel.add(labelPanel, BorderLayout.LINE_START);
        dataPanel.add(fieldPanel, BorderLayout.CENTER);
        return dataPanel;
      }
      
      private JPanel createBtnPanel()
      {
        JButton cancelBtn = new JButton("Cancel");
        JPanel btnPanel = new JPanel(new GridLayout(1, 0, 10, 0));
        btnPanel.add(cancelBtn);
        btnPanel.add(saveButton);
        
        JPanel outerPanel = new JPanel();
        outerPanel.add(btnPanel);
        return outerPanel;
      }
      
      public void addSaveBtnListener(ActionListener al)
      {
        saveButton.addActionListener(al); 
      }
      
      public String getText(String fieldName)
      {
        JTextField tfield = fieldMap.get(fieldName);
        if (tfield != null)
        {
          return tfield.getText();
        }
        else
        {
          return null;
        }
      }
    
      public JComponent getComponent()
      {
        return mainPanel;
      }
    
      private static void createAndShowUI()
      {
        JFrame frame = new JFrame("Category2");
        frame.getContentPane().add(new Category2().getComponent());
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.pack();
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);
      }
    
      public static void main(String[] args)
      {
        java.awt.EventQueue.invokeLater(new Runnable()
        {
          public void run()
          {
            createAndShowUI();
          }
        });
      }
    }

  5. #25
    Fubarable2 is offline Member
    Join Date
    Oct 2008
    Posts
    2
    Rep Power
    0

    Default

    Guess what? It lets me post my code. Now if you'll just read and believe us you can post your darn code. Or not. It's up to you if you want help or not. Either way, I'm out of here.

  6. #26
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by hervey View Post
    Fubarable Fubarable: not in my case, you sign up a new account, just for testing, go to my page (that everybody seemed to find so difficult) and then copy all of the code into your first post and see what your forum says to you.
    There is no such restriction lol. As I said in one of the earlier thread please read our FAQ page.

  7. #27
    hervey is offline Member
    Join Date
    Oct 2008
    Posts
    24
    Rep Power
    0

    Default

    So all I've gotten from this thread is absolutely nothing so far, does anybody know the answer please.

  8. #28
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,308
    Rep Power
    25

    Default

    Is the problem with the HTML you posted? You'll get better help with HTML on an HTML forum.
    Or with the java program? Which you haven't posted.
    No way anyone can help you if you do not post your code.

  9. #29
    hervey is offline Member
    Join Date
    Oct 2008
    Posts
    24
    Rep Power
    0

    Default

    I thought I would come to a Java forum seem as though I need to know how to make a Java applet click-able, I suppose it is HTML, but seem as though you all deal with Java I thought I would be better of askign in a Java forum.

  10. #30
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,308
    Rep Power
    25

    Default

    how to make a Java applet click-able,
    What do you want to happen when a java applet is clicked?
    The java code in the applet will do what?

    There are a couple of ways for an applet to communicate with a browser.
    One it can tell the browser to load a new HTML page.
    Two it can call a javascript method.

  11. #31
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by hervey View Post
    I thought I would come to a Java forum seem as though I need to know how to make a Java applet click-able, I suppose it is HTML, but seem as though you all deal with Java I thought I would be better of askign in a Java forum.
    You come asking for free help but don't do the simple things requested of you to allow others to help you. I hate to say it, but at this point you may be getting all the help you possibly can get or deserve.

    If you really want help, try to put a little effort into making it remotely possible for someone to help you. Post an SSCCE. Either that or go and you may wish to pay for your help.
    Last edited by Fubarable; 10-29-2008 at 10:31 PM.

  12. #32
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by hervey View Post
    So all I've gotten from this thread is absolutely nothing so far, does anybody know the answer please.
    That mean you haven't tried anything so far. You have lots of suggestions there. But seems to me you just looking just the code.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 0
    Last Post: 07-01-2008, 09:06 PM
  2. java applet button problem .. :( plz help!
    By i4gotmyid in forum Java Applets
    Replies: 1
    Last Post: 04-17-2008, 04:11 PM
  3. java applet button problem .. :( plz help
    By i4gotmyid in forum New To Java
    Replies: 0
    Last Post: 04-05-2008, 09:55 AM
  4. search button java applet awt
    By perplexingtrax in forum New To Java
    Replies: 2
    Last Post: 03-24-2008, 01:49 PM
  5. applet button
    By kazitula in forum Java Applets
    Replies: 2
    Last Post: 11-14-2007, 07:25 AM

Posting Permissions

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