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 3 of 3

Thread: Creating a UI with transparent background on top of JLabel element

  1. #1
    Junior Member
    Join Date
    Oct 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post Creating a UI with transparent background on top of JLabel element

    Hi there everyone, this is my first post here, so if I am doing something wrong, please don't hesitate to correct me.

    I have a program that uses a JLabel to display an image, and want to have a component in Java draw circles on top of several spaces on the image, and display integer values within the circles. I then need these circles to be able to be selected by a mouse click - I'm trying to make a Risk-style game, and the circles will display troop counts. A user will click a circle, then click another to attack. The program will check to see if the territories can attack each other, and will allow dice to be rolled, max 3 for the attacker and max 2 for the defender, allowing the attacker to retreat after each roll of the dice. If the attacker wins, they will choose how many troops to move in, if the defender wins, they will retain control of the territory. I'll likely need continued help as I continue with this project, thanks to all for your help.


  2. #2
    Junior Member
    Join Date
    Oct 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Creating a UI with transparent background on top of JLabel element

    ...bump?

    Please guys, I have no idea what to do.

  3. #3
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Creating a UI with transparent background on top of JLabel element

    Quote Originally Posted by user 18 View Post
    ...bump?

    Please guys, I have no idea what to do.
    Your post above wasn't really associated with a question...which is possibly why no one has replied. I recommend reading the getting help link in my signature, and the following
    Trail: Creating a GUI With JFC/Swing (The Java™ Tutorials)
    Trail: 2D Graphics (The Java™ Tutorials)
    How to Write a Mouse Listener (The Java™ Tutorials > Creating a GUI With JFC/Swing > Writing Event Listeners)

Similar Threads

  1. Replies: 3
    Last Post: August 19th, 2011, 03:37 PM
  2. Creating and implementing class for creating a calendar object
    By kumalh in forum Object Oriented Programming
    Replies: 3
    Last Post: July 29th, 2011, 08:40 AM
  3. Everything but JLabel is displaying
    By Jacksontbh in forum What's Wrong With My Code?
    Replies: 2
    Last Post: July 3rd, 2011, 10:30 PM
  4. Is it possible to make a background to in image transparent
    By Zein in forum Java Theory & Questions
    Replies: 10
    Last Post: June 13th, 2011, 04:18 AM
  5. Replies: 3
    Last Post: February 26th, 2009, 05:21 PM