Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: array of type JButton

  1. #1
    Junior Member
    Join Date
    Jun 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default array of type JButton

    how to take existing text in the JButton is stored in an array of type JButton?
    I've tried the following ways but can not


    public JButton b[]={null,k1,k2,k3,k4,k5,k6,k7,k8,kk};
    System.out.println("isi tujuan = "+b[5].getText());

    Thanks...


  2. #2
    Junior Member
    Join Date
    Apr 2013
    Location
    Earth
    Posts
    21
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Re: array of type JButton

    re-check in code that you have set the text for JButton in Swing .............

Similar Threads

  1. Replies: 2
    Last Post: January 14th, 2013, 03:22 PM
  2. having problem declaring a generic type array in OrderSet class
    By mia_tech in forum What's Wrong With My Code?
    Replies: 2
    Last Post: July 10th, 2012, 07:39 PM
  3. Creating array from generic type objects?
    By AndrewMiller in forum What's Wrong With My Code?
    Replies: 4
    Last Post: November 13th, 2010, 09:22 PM
  4. Persistence causing problems with JButton 2D Array
    By easyp in forum What's Wrong With My Code?
    Replies: 1
    Last Post: April 21st, 2010, 01:21 PM
  5. Error of missing return statement while implementing Array
    By MS_Dark in forum Collections and Generics
    Replies: 1
    Last Post: December 10th, 2008, 03:18 PM