adonaldson's Profile
Reputation: 0
Apprentice
- Group:
- Active Members
- Active Posts:
- 52 (0.23 per day)
- Joined:
- 07-October 12
- Profile Views:
- 160
- Last Active:
Nov 16 2012 12:12 PM- Currently:
- Offline
Previous Fields
- Country:
- Who Cares
- OS Preference:
- Windows
- Favorite Browser:
- FireFox
- Favorite Processor:
- Intel
- Favorite Gaming Platform:
- Who Cares
- Your Car:
- Toyota
- Dream Kudos:
- 0
Latest Visitors
-
john55 
12 Nov 2012 - 14:28
Posts I've Made
-
In Topic: mouseMoved event to read Color
Posted 11 Nov 2012
Thank you for your time.
I changed it to if color is equal to ocean then do nothing, else get color of state.
private void mapPanelMouseMoved(java.awt.event.MouseEvent evt) { Color ocean = new Color(image.getRGB(1, 1)); Color color = new Color(image.getRGB(evt.getX(), evt.getY())); if (color.equals(ocean)) { //if ocean do nothing, else display state of that color } else { this.setTitle(findStateByColor(color) + borderStatesMap.get(findStateByColor(color))); }//end is else } -
In Topic: mouseMoved event to read Color
Posted 11 Nov 2012
SasquatchProgramming, on 11 November 2012 - 07:50 PM, said:In your generated code it says "mapPanel = new collections.USMapPanel();"
How did you get your mapPanel to be a USMapPanel?
I am working on the same project and couldn't figure that one out.
Nevermind, I'm retarded.
Well I hope you're doing better than I am. I at least had the image showing up but now it won't even do that. So frustrating... -
In Topic: Maps and ArrayLists - Is this code correct?
Posted 11 Nov 2012
Yay! Thank you for your patience and time. This is my last Java program. Next semester it's C++ but with the same teacher
-
In Topic: Maps and ArrayLists - Is this code correct?
Posted 11 Nov 2012
How about this? Can you start this in the middle of an array?
for (int i = 4; i <= stateInfo.length; i++) { usStates.add(stateInfo[i]); }//end for -
In Topic: mouseMoved event to read Color
Posted 11 Nov 2012
Good point. I moved ocean to my class scope variables.
I am hardcoding the ocean color just to be sure I get it right, for now and will find the value later.
And i changed the equivalent expression to:
private void mapPanelMouseMoved(java.awt.event.MouseEvent evt) { Color color = new Color(image.getRGB(evt.getX(), evt.getY())); if (!color.equals(ocean)) { this.setTitle(findStateByColor(color) + borderStatesMap.get(findStateByColor(color))); }//end if }
Have I finally got a workable method again?
My Information
- Member Title:
- D.I.C Head
- Age:
- Age Unknown
- Birthday:
- Birthday Unknown
- Gender:
-
- Programming Languages:
- C++, Java
Contact Information
- E-mail:
- Private
Friends
adonaldson hasn't added any friends yet.
|
|


Find Topics
Find Posts
View Reputation Given
|
Comments
adonaldson has no profile comments yet. Why not say hello?