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: No code, assign same value to group of command buttons

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

    Default No code, assign same value to group of command buttons

    I have 25 command buttons. I need to split these 25 buttons into three groups of 10, 10, 5.

    With a predefined value of 6(group5), 12(group10), and 4(group10).

    What would be the easiest way to do this?


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    SW Missouri
    Posts
    20,408
    Thanks
    49
    Thanked 2,214 Times in 2,187 Posts

    Default Re: No code, assign same value to group of command buttons

    Three loops:
    1) 5 for 6
    2)10 for 12
    3) 10 for 4
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. SWT- one Group taking all space vertically and hides other group in compoiste
    By Rajesh Prabhu in forum What's Wrong With My Code?
    Replies: 1
    Last Post: October 25th, 2013, 04:54 AM
  2. How to get the command line to function from Java code
    By summit45 in forum What's Wrong With My Code?
    Replies: 0
    Last Post: August 24th, 2013, 01:19 AM
  3. Which Java command generates IJVM Code
    By nataleks2000 in forum Java Theory & Questions
    Replies: 1
    Last Post: April 18th, 2011, 07:10 PM
  4. How to add buttons on this code
    By tarell85 in forum What's Wrong With My Code?
    Replies: 5
    Last Post: April 18th, 2011, 07:08 AM
  5. Replies: 0
    Last Post: March 5th, 2010, 12:32 AM