Results 1 to 3 of 3
  1. #1
    JavaScrub is offline Member
    Join Date
    Oct 2013
    Posts
    2
    Rep Power
    0

    Default If with cell colours

    I have a bingo game that changes the textfield color to yellow once the chip matches a number on the bingo board
    For my final BINGO Winner statement I'm trying to do:
    if (O1.setBackground(Color.YELLOW) && O2.setBackground(Color.YELLOW) ...){
    System.out.println("BINGO")
    }
    I kinda had my doubts that it wont work and it turned out not to work.. idk what to do ;l










    Secondary Minor Question:
    Hello, I have a Bingo program that calls a chip through a button!
    I want the chip to be a unique number and is not duplicated from previous/upcoming calls!

    This is what I have right now. I think I need to use an arraylist but I have no idea what they are >_>
    I have declared dice as int already

    Random number = new Random();
    dice = 1+number.nextInt(75);

  2. #2
    monkeyjr97 is offline Senior Member
    Join Date
    Nov 2012
    Posts
    256
    Rep Power
    3

    Default Re: If with cell colours

    you should be saying:
    if O1.getBackgroundColor(Yellow) && O2.getBackGroundColor.....

    Sets dontt return anything so the if statement makes no sense

    ArrayLists are are data structures, pretty basic and simple to understand

    Google : Java ArrayList tutorial Oracle

  3. #3
    JavaScrub is offline Member
    Join Date
    Oct 2013
    Posts
    2
    Rep Power
    0

    Default Re: If with cell colours

    Quote Originally Posted by monkeyjr97 View Post
    you should be saying:
    if O1.getBackgroundColor(Yellow) && O2.getBackGroundColor.....

    Sets dontt return anything so the if statement makes no sense

    ArrayLists are are data structures, pretty basic and simple to understand

    Google : Java ArrayList tutorial Oracle
    Yea, I was getting a void error!
    So do you have any reccomendations on how I should do it?
    I can post my code... although it is verry lengthy (500 lines ;l) and inefficient (still works though)

Similar Threads

  1. Replies: 4
    Last Post: 01-04-2012, 10:28 AM
  2. outputting different letters in different colours
    By Sarah24 in forum Java Applets
    Replies: 4
    Last Post: 03-02-2011, 03:32 PM
  3. How to print words in different colours?
    By veen in forum New To Java
    Replies: 7
    Last Post: 06-10-2010, 05:54 PM
  4. Replies: 0
    Last Post: 01-27-2010, 04:52 PM
  5. PDFBOX change text colours and remove background
    By gstkein in forum Advanced Java
    Replies: 1
    Last Post: 11-20-2009, 12:54 PM

Tags for this Thread

Posting Permissions

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