Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!

jhon max

Ranch Hand
+ Follow
since Jan 06, 2010
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 jhon max

is it possible to make, for example 2 different L&F in a two components within the same window?
example "Metal" for a button and "Nimbus" for another button.. I dont know how to implement the .setUI() button of every swing component. i read the API and it says that .setUI() and .getUI(), sets and returns the look and feel of a components, i just dont know how.
8 years ago
I mean the header on the west corner of the table, the header that represents each row
8 years ago

no sir...

I didnt mean to say that I didnt check it, actually it helped me a lot..Im just getting too confused on the resources that Im getting from google.. sorry for using such an informative words, but english is not my native language , im sorry,

what I mean with "no sir" ,- I didnt know what should I do In the method that you gave me to make a selection focus,

again, Im so sorry, I didnt intend to waste your effort, sorry for using such a word...
8 years ago
no sir...

to make the highlight(the selection focus) i have to click first the table so there will be a selection focus in any of the cell, so If i search the matching value it will highlight it,,

but i have to click first the table... is there any way to make a default selection focus ?
8 years ago

In pseudo code
1) User types something
2) Figure out which cell has a match
3) Scroll to the required cell.



tnx for the psedocode sir,

,, this one was reffering to the cell I never thought of that thank you for that,

I solved that part.. But the problem now is the highlight of the specific cell, those codes that I posted was just for illustrating the problem, but in my original code
I have a rendered table with Image background, when I clicked(selected) a cell I dont see a highlight but the foreground color of the text in the cell changes(Im fine with that),

what I want now is the selection focus,

For example I have already searched the value, the program will automatically highlight that cell , how can I accomplish this one?
8 years ago


heres a program for the auto scroll.
I tried to get some idea on this program but I only know how to scroll automatically at the "bottom", what I need now, is to specify the view of the scroll according to the searched value.. I tried to search and play with Viewports, but Im still stuck with this problem, I'm not also sure If the viewport can help me with this... please I need more help...
8 years ago

I have some problem with searching a value(focusing on the selected searched row).

when I run the program the table doesnt have the selection focus (if that is the right term to say). I have to click first in any of the cells in the table, so the selection will be on focus.
(is there any way to make a default selection focus in a JTable?)


when the program searches for the equivalent "name" input in the text field, it highlights it but the "scroll" doesnt scroll down to view the part where that value resides
8 years ago
oh my... Is there any simple way to resolve this sir.??
8 years ago


but I still get a null value

the whole changes I made


8 years ago
I have a class here that I want to act just like a JOptionPane..




but Im stuck with returning a value.. anyway I left some of the method as void to be easily compiled, but lets assume that it returns a String value...
what I want is if I press the button it will return a value from another class that calls that method... please I need help ..
8 years ago


In this sample code you can see that I can only display the selected row and columns (cells) by clicking a cell.

My question is what action/event should I implement for displaying the selected cell by pressing the 4 directional arrows?

please I need help with this.. thank you very much
8 years ago


Im having some problem regarding with displaying the selected column header, Im getting -1, how am i supposed to resolve this.. thanks!
8 years ago
I beg your pardon.. im sorry to make the title unclear or irrelevant to the posted code, .. what i want in my JTable is when i click a row, that row will be highlighted, but in this case i have an image Background in my Jtable,
Im having problems with that,

When I tried to remove the background , I can easily do that specific thing that I want, the whole row that I clicked was Highlighted, because of the background I cant see the highlight,
but I need to apply an Image Background in my JTable...

Is there anything to do with TableRenderer?
8 years ago