Results 1 to 2 of 2
  1. #1
    v2kish is offline Member
    Join Date
    Nov 2010
    Posts
    2
    Rep Power
    0

    Default Button Action using netbeans ui

    Hi Forum,
    I am new to swing , netbeans . using netbeans ui components i set the button and text filed on the panel , set the button text to click ,

    my intention is when i click on that button using mouse it have to show message " hai" in the text field . a simple example for my understand .

    here i don't understand how can perform this action .

    on the button while using the event action perform in the code it show the
    following function.

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
    // TODO add your handling code here:
    jTextField1.setText("hai");
    }

    to show the hai message in the textfield i add jTextField1.setText("hai"); as shown,

    but while check this using preview design there no action takes places .

    so please help me how can i perform this action using netbeans ui and action perform in code


    thanks in advance

  2. #2
    madcloud is offline Member
    Join Date
    Dec 2010
    Posts
    9
    Rep Power
    0

    Default

    preview just shows how the interface will look like when you run it, its not a functional app. Hit play button (run or F6) to run it.

Similar Threads

  1. Action button HELP?
    By utoptas in forum New To Java
    Replies: 3
    Last Post: 08-27-2010, 10:40 PM
  2. Button Group in Netbeans.
    By makpandian in forum NetBeans
    Replies: 2
    Last Post: 03-22-2010, 01:26 PM
  3. Replies: 3
    Last Post: 01-23-2010, 02:44 PM
  4. How can I catch the radio button action in jsp?
    By srinivas2828 in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 09-18-2009, 04:05 PM
  5. Please help on Button action
    By michaelxiao in forum New To Java
    Replies: 4
    Last Post: 04-24-2009, 10:55 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
  •