Robson Martinz

Ranch Hand
+ Follow
since Jun 01, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
34
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Robson Martinz

Hi.
I'm trying to make a simple table with JTable class by reading the following tutorial but when try to see my JTable my program doesn't show me nothing! What i'm doing wrong?
http://docs.oracle.com/javase/tutorial/uiswing/components/table.html#renderer

9 years ago

Why are you setting the renderer every time a mouse click happens? What are you trying to achieve here?


Because i want paint the entire line when a mouse click happens. Why is this wrong?

If your table model is an AbstractTableModel or some subclass of that, then to get a row repainted you call the
model's fireTableRowsUpdated method with suitable parameters.



Yes is an AbstractTableModel. I tried this to see what happens but i got a compilation error.
"Cannot find symbol error.
Symbol method fireTableRowsUpdated"


Mods, please, i accidentally clicked in "Resolved" but this problem is not solved yet!
9 years ago
Hello! I have in my app a JTable. I would like to know how can i do to, when i click in a cell, my jtable paint the entire line of this cell.
Here is what i did.

Method call:


RowRender class:
9 years ago

Try "metal" instead of "Metal".




Thank you for your help guys.
9 years ago
Hi!
I'm trying to make a app with user interface using Netbeans7.4. Everything is working fine, but when i try to change look and feel in my code, Netbeans doesn't show any error but doesn't change nothing too! I believe my default look is "Nimbus". When i try to change to Windows, or Metal he doesn't shows me any compilation error but does not change nothing. What is wrong?

Part of my source code:


I'm using Debian Wheezy 7.1 with OpenBox.

Thank you!
9 years ago
Problem solved. Thank you for your answer, guys!

Using equals or equalignirecase.
10 years ago
And please, consider this example of my file.

61 13 31 28 80 52 41 Albert Rosenberg
64 76 36 45 54 35 09 Joel Whatever
23 25 54 45 75 01 69 Albert Rosenberg
79 25 63 37 75 42 19 Michael Burton


Thank you for your help!
10 years ago

That is different from what you told us earlier. Please explain.


I want to encapsulate each name with the number of times it appeared in the file, so i created a class just for the names.

I'm sorry! I don't know what is different from earlier. I told you guys i want to read the numbers and names. I would like to count how many times some name appears in the file. I almost solved my problem, but i have another one. When i read two names that are equal, my program say they are different! I tried to call "getBytes()" and he shows me two different things, but the names in the file are the same! If in this case i have to create another topic, please tell me.


Please, consider this class Names, instead of my first one, in my original post. I decided change her a little bit.
10 years ago
Hello people!
I made a software using Netbeans and javaswing. Accidently i deleted my main file which contains my main class and main method. Just to test, i tried to compile and run and it worked but the style of my buttons and windows has changed.
So, what happened? How can i change the style of my programs?

10 years ago

Campbell has a great suggestion.



What suggestion? Use scanner or create a class which encapsulates both an int[] and a name.?
10 years ago
So, i cannot use "split( "\\s+" ) )" anymore? This method take only one argument! I would like to use regular expressions.
Campbell Ritchie, i use two classes because i think it looks more organized. Don't you think? I would like to count how many times a name appears in this file, that's why i use Names class with a string and an integer value.
10 years ago
Hello, guys!
I have a text file containing numbers and names as shown in the example below:

61 13 31 28 80 52 41 Albert Rosenberg
64 76 36 45 54 35 09 Joel
79 25 63 37 75 42 19 Michael Burton


I'm making a program that will read the file and put the numbers in a list of int arrays and names in another list of strings. In my program i created two classes. One will receive the numbers and the other will receive the names. But i only can read the numbers! How can I read everything and separate into two different lists?
Here is what i did.
10 years ago
Thank you, guys! Now everything is ok.
10 years ago
Hello guys!

I would like to know which one is more appropriate to use in "for" loops or "while" loops. Thank you!
I don't know exactly when to use Integer or int.


10 years ago