Results 1 to 4 of 4

Thread: User Forms?? Please Help!!

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2000
    Location
    Chesterfield, UK
    Posts
    298

    Question User Forms?? Please Help!!

    How do I open a user form using Java
    Please Help!!

    Thanks in Advance


    Regards


    Matt

  2. #2
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    What do you mean by open a user form? Is it a form that you have assembled using .awt or Swing? Just created an instance of the class in which the form is contained and set it's Visible property to true.

    import javax.swing.*;
    import java.awt.*;

    class myform{

    myform(){
    JFrame jf = new JFrame("My Frame");
    JButton jb1 = new JButton("Button 1 ");
    JButton jb2 = new JButton("Button 2");
    JButton jb3 = new JButton("Button 3");

    JPanel p = new JPanel();
    Container c = jf.getContentPane();

    c.setLayout(new GridLayout(3,1)); // if you wanted to change the default (BorderLayout) manager.

    p.add(jb1);
    p.add(jb2);
    p.add(jb3);
    c.add("South",p);
    }
    }

    class test{
    public static void main (String[] args){
    myform = new myform();
    myform.setVisible(true);
    }

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2000
    Location
    Chesterfield, UK
    Posts
    298

    Well

    I have a userfrom that has been created using the visual basic editor.

    What I would like to do is to be able to show this form by calling it from a button click on my web page(html).

    Is there a way to do this??

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    I really doubt that will work very well.

    However, if the form is in the page, you might be able to redirect the browser to a VBScript: style URL to trigger it.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

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



Click Here to Expand Forum to Full Width