Just wondering but what IDK are you using. I know in eclipse there is a way you can have it generate the getter and setters for you, its pretty nice.
Type: Posts; User: jocdrew21
Just wondering but what IDK are you using. I know in eclipse there is a way you can have it generate the getter and setters for you, its pretty nice.
Just had a lesson on pack that I won't forget... Thanks again, spent hours on this simple task for it to be answered by a simple four lettered word. Another four letter word comes to mind as I wrote...
I have read the API and looked at examples but its not answering my question. Which layout would treat a panel as its own entity. Meaning if I made a method that made a matrix of buttons using...
I want to take the name and turn it into a integer value 1-22 since my HashMap is size of 22.
Something like this but I know it does't work...
int value = (int)name % 22;
I used flowLayout inside the Panel and just resized the Frame in the constructor so the buttons are where I want. I was just thought or hoped there was a better way to make a matrix of buttons.
I think this answered my question. Fired at the hip at this one.
//play with Hash Tables
void setNames(Node node)
{
HashMap<Node, Integer> map = new HashMap<Node, Integer>(22);
...
I was wondering if I was over looking something and there was a way to just simply send in a name and place it in a hashTable. Perhaps send in a Node and index it by a string value inside of it.
When learning HashMaps in C++ I had to create the whole algorithm. In the code I created I could simply place a string into the method and it would store the names for me by turning the string into a...
I am even trying to use BorderLayout and this is my issue. The buttons are huge despite me setting there size. They are the correct size when I use FLowLayout(). However when I try to center them I...
Centering the panel onto the frame... Obviously it's not doing what I thought
I thought about what you said and I changed a few things... Now I am having a different issue as well. I read the API and it appears I am implementing it correctly.
...
Ahhhh.. Thank you
JPanel numberButton(JPanel panel)
{
String[] names = {"1","2","3","4","5","6"};
List<JButton> buttons = new ArrayList<JButton>(6);
for(int i=0;i<6;i++)
It is a very small program so I will post the whole thing. The error says "Type is not generic" when I take my mouse and put it under the red line that is under List.
Exception in thread...
I have done this many times before and now I am getting a weird error. Say "Type is not generic", I have all the necessary imports, I do not get it...???
JPanel numberButton(JPanel panel)
{...
Looks like someone was given an assignment for a job interview...
Random (Java Platform SE 6)
Produce random numbers, then assign the variables returned as you see fit.
What have you done so far. Post some code and several people will help you think it out.
This is the same question you posted a few hours ago. Please continue using that same thread...
This is the same question you just posted but with a different title.
Please edit your post and wrap your code with code tags:
YOUR CODE GOES HERE //to make it look like this
I threw something together but it doesn't line up perfectly and its just a patch. This might put you on the right track...
//Top half of hourglass.
public static void drawTopHalf(int...
It bugged me all day at work and it just clicked. It was so simple I felt pretty dumb for not thinking of it sooner. It kinda feels like a patch to a poor thought out plan but it is fully...
I have narrowed down the issue by writing println statements and something odd is happening. The '+' operator is working in the switch statement but the others are not. However in the println...
Create a new instance in the main class of Painting then use its methods accordingly, however look into how to use scanner too...
Java.util.Scanner.next() Method Example
@GregBrandon
Yes I was wondering that as I wrote several else if statements. Once I get the MVC down I will move on. I about narrowed down the issue but it is still doing a few funny things.
As...