Honzak Troubak

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

Recent posts by Honzak Troubak

My explain is easy. I have to check if focus in JTable has been changed. And I found tutorial at http://www.java2s.com/Tutorial/Java/0240__Swing/TableSelectionEventsandListeners.htm page which worked well when I used it first time. Unfortunatly now it is not working.
10 years ago
Hello,

I don't understand why doesn't work ListSelectionListener in my project.

Here is my code:



When I try debug method getSelectedRow() I can see that doesn't run this part of code:



I use this code in other part of my project and there it works well.

Could anybody explain me where is the problem?
10 years ago
You are right! It is the easiest and best way. I am silly because I tried more than two hours how set up FlowLayout. Thanks!
10 years ago
Hello,

I need help with FlowLayout. I have three component which I would like to put on the panel. First and second component are short so they could be on one line a third component long so it should be on new (second) line.



For my requirement should serve FlowLayout which puts component consecutively. But my problem is that on panel is probably one line so third component is not seen.



When I remove first and second component from panel, third component is seen.

Could anybody tell me how show all components that first and second are on one line (on the left and on the right) a third component on new line?

Thank you
10 years ago
Thank you so much, I changed Look and Feel and the problem is solved.
10 years ago
I'm not sure. I did not set or change Look & Feel.

I run on Windows 7 professional and I use last edition of Java.

This class is extends of JDialog and layout is used GridLayout.
10 years ago
Hello,

I need help with background of JButton. I need set background of JButton but usual way doesn't work. Only the edge is setting to color.



I tryed to use setOpaque(true) and setBorderPainted(true/false) but unfortunatly it doesn't work.



Does anybody have any idea?

Thanks a lot
10 years ago
Hello,
I would like upload file bigger than 2MB (default max size).

I found that I should insert <constant name="struts.multipart.maxSize" value="XXX"/> on top of struts.xml and

to action where I want upload the file.

I'm not sure if I have to insert

to pom.xml but it didn't help.

When I am trying upload file it throws nullpointerException. I know where is the problem but I don't know how to fix it. Problem is that file is empty. When I delete interceptor from action and upload file smaller than 2MB everything works well. Could anybody help me?

My s:file is


action is:


and method is:


Thank you
10 years ago
Hello guys,

I have troubles with validation of forms.

I decided that I will use way where if have any problem I will call addActionError(getText("error")); and return ERROR.

Unfortunatly I'm using a lot of "type=chain" because I have call more method together. I found is a lot of troubles with using chain. I cant show errors in my <s:actionerror/> because error does not pass through chain.

Maybe only one resolution is use struts.xwork.chaining. I found that I should put



to struts.xml.

With using struts.xwork.chaining it is better but I have still trouble: I have 3 actions. I have to go from action updateTopic to adminTopics.jsp.




And when I set struts.xwork.chaining.copyErrors to true (others both are TRUE) method addTopic() returns Error but methods readTopic() and readConference() didn't run and application skip to page adminTopics.jsp and actionError is showed.

When I set struts.xwork.chaining.copyErrors to false, all methods run OK but <s:actionError> show nothing.

Could anybody say me what should I do?



10 years ago
You were right, thanks a lot!
10 years ago
Thanks for reply.

It is good idea. If I understand you well I will should use action instead of scriptlet. But how is possible call action inside the Iterator tag?
10 years ago
Please could anybody help me?

I am trying use Struts2 validation but in still doesn't work and I don't know why.

I have form



where I want validate an email.

I have action class ViewUser and XML validationFile ViewUser-validation.xml in same package.




ViewUser-validation.xml contains




Has anybody any idea why it doesn't work? When I put to email editBox not email value nothing happened.

I looks like when it doesn't know about validation file. Validation file should name MyActionClass-validation.xml I think it's ok.

I use Maven2 is possible problem could be there?

Thanks so much
10 years ago
Hello,

I need get value from scriptlet to s:param value. I know I shouldn't use blend scriptlets and Struts tags but this is probably only one way. Complete code is:



Scriptlet give me variable "complete" which I need put to value for parameter user (last one)

I tryed value="%{complete}", value="%{#complete}", value='#complete', etc., but unfortunatly works.

Could anybody help me?
10 years ago
Thanks for your response I will try it.
10 years ago
Hello guys,
is possible run an action directly in iterator?

I know how I can run an action via "a href" or in "img src" but is possible run the action in iterator how is in my example?





Method nameOfPaper() returns String nameOfPaper.
10 years ago