Paul Hayabusa

Ranch Hand
+ Follow
since Jan 17, 2013
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
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Paul Hayabusa

Paul, I got it! I used the length method. The Problem I discovered the letter/number touched by the user is NEVER selected. I wonder if I have to change the array of chars raining on the screen for one of the images(what could cause a memory leak).Any thoughts?
2 months ago
Paul,
sorry for my stupidity, but WHAT is a zero length text and how I test that?
2 months ago
Tim, I am doing:

But I still get the same error.
2 months ago
I resolved doing: extends AppCompatTextView implements View.OnTouchListener {
but my code doing the business:

releases a lot of java.lang.StringIndexOutOfBoundsException: length=0; index=0 because many times the user will click on empty space(it's a raining of chars).I wonder if there 's a proper way to avoid that.
2 months ago
Tim,
I should have been much more specific:
I don't know how to capture the char in the screen.
I do more or less:


best wishes
3 months ago
Tim,
the rain of characters works fine, I don't know the better/correct way to get them when the user click on the screen to answer the question!
Never worked with that before, sorry. Just need an orientation. Should I use onTouchEvent to get that char?I appreciate any snippet o code.
3 months ago
I am making my first android app, a children's game where there is a rain of chars on the screen and the child must click in a correct one to answer a given question.I did a matrix effect following this tutorial:
http://www.devexchanges.info/2016/11/androip-tip-create-digital-rain-effect.html and works fine
My question: How is the better way to get the character?
3 months ago

Similar to the renderer.


I read that tutorial to make my renderer.And works flawless if i dont edit my row.I dont get it with the Editor.I will put the same way i made in my TestCellRenderer checking the values for getPoints()?Can you give a snippet of code?


Best Regards,

5 years ago
Nam Ha Minh,
how i implement that Editor?


Best Regards,

5 years ago
Darry, i use my own TableModel(extending AbstractTableModel).

And i return a JLabel there:

I was trying:


But update everything but the JLabel with my Icon...

5 years ago

Can't you just replace that with one line?


Yeah, you are totally right, a big overwork on my part.

I still can t change the JLabel after edit(only when i close the frame and reaopen again), if you have any thought about it how to do it i will apreciate.


Best Wishes,

5 years ago
Good evening!
I have a JTable with a JLabel where i show a given picture if a person is approved(or failed) in a test.
I use that renderer:
It works flawless, until i have to edit a Student in a JTable row.I open a screen with the contents of that row for edition.Of course, my Table model dont show a value, but a JLabel where i show the picture.But in my Edit frame, i have a box with values.I tried to update after i choose a value but dont works(off course, if i close the main frame and open the imagem is showed modified, but i need to show the rows updated after i close the edit frame(NOTE: all other fields i change in Edit frame updates, less the JLabel).I tried that:

but dont update the picture.Any thoughts?


Best Regards,
5 years ago
thanks,
Rob Camick , but i found my mistake!
Its just use setValue instead of setText...yeah, very stupid.

Thanks, for your help!
6 years ago
I have a component that works fine for a lot of things, like register data in different ranges but i found out when i display a INTEGER data(example 11) from DB, it shows wrong.If i put to display with 2 decimals, it shows 0,11(instead of 11,00).with one decimal, it shows 1,1(instead 11,0).The component is below:

Example of how i use:

Where is the mistake?


Best Wishes,
6 years ago

Martin,
yes...the two columns have the same behaviour!

I tried that:

And in JButton:


Of course, because of the read of all columns, i got a ClassCastException error and dont works fine.

About your method: Superb!Almost flawless!The only problem is when i edit, they remain the prior color till i have pressed jbutton.
I will change that controlling cell Focus.

For everyone in trouble, the final code(Thanks Martin) is:

and Analyze JButton:

It works no matter how many cells you have!

Many thanks for you help...incredible how ridiculous(and simple) your method works!
Best Wishes!!!
6 years ago