Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

Alex Ter

Greenhorn
+ Follow
since Sep 30, 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 Alex Ter

thanks for the help for those who cared and for the virulent cross post hunter I really really apology. I really wasn't aware about cross posting issues as I never really got any help from forums and didn't expect that same people were on all the forums as I don't see the point to have then so many different ones.... anyways I'm really sorry
11 years ago
Hi all,
I know this king of issue is quite common but I'm brand new in java so I found clues about my problem but didn't manage to make it works. Basically, I'm trying to build a small image processing program in which you load an image and then do simple stuff like rotating, changing colors, etc....
So far (which is very close for the moment...) I have a main frame which has a menu item saying "load image". When I click on it opens a file chooser, i select a picture. I would like to create a panel and then display it on the main frame.
So to do that, I retrieve the path of the picture from the file chooser in the ActionPerformed method but I wondering what to do then.

The thing is that I have to draw this picture on a panel then add it to the frame but after this I'll have to reuse it all the time when I'll do some modifications in the image. So I guess I shouldn't create the panel in the ActionPerformed method, should I ?
If not how can I return the string path of the picture from the ActionPerformed ? I tried to do it with setter/getter methods but probably didn't do it properly. Could you give me a bit of help regarding the right way to implement this kind of program ?
thanks
Here is my code for the main window, I'm using netBeans 6.9.

11 years ago
any hint??... I'm quite stuck thanks.
ok thanks, I tried to lo on another webpage (https) which has the same kind of form with a javascript validation. I used httpclient and get a message "other session running" as a response. Here is the code, it seems to go a bit further :

thanks for your answer. In fact, there is no need of any password so what i meant by userid in the code ex would be replaced in by the real userid but I guess I should use "UserID=xxx" right ?
ok I confess that I'm quite new java and I thought I was sending the id by the writer.write(encodedData); so am I offending the java's god by this sentence ??
Hi again,
so I allow myself to post a new topic cause the problem basically changed, I can't post as I want to login, still geting the login page as a result:
thanks
for the help


thanks so I tried this with no luck, still ending up on the login page:



[NK] Please UseCodeTags
well...... now I'm a bit embarassed cause I didn't read that httpclient did not handle this auth method... then that's really true that the website uses a post method so I just need to use something like :

HttpClient client = new HttpClient();
client.getParams().setParameter("id", "pass");



PostMethod method = new PostMethod("url");


?? thanks for the help
Hi guys, I have an issue to login to a website with a simple form login.

My code always returns website login page despite the fact that all the parameters are correct and I'm trying to access to a home page. I'm using the classic AuthScope.ANY method.
thanks for your help. Please don't pay attention to the url mistake and correct it easily if you wan't to give a try...



[NK] Please UseCodeTags