This week's giveaway is in the Java in General forum.
We're giving away four copies of Java Challengers and have Rafael del Nero on-line!
See this thread for details.
Win a copy of Java Challengers this week in the Java in General forum!

morten wilken

Greenhorn
+ Follow
since May 25, 2002
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 morten wilken

hi,
we just went through a similar situation.

try to instruct both your client and server that you have a proxy in between.

use -Dhttp.propxtHost=IP_ADDR -Dhttp.proxyPort=PROXY_PORT on the server, and something similar on the client

hope it helps
sincerely
morten
16 years ago
hi anish,

thanks for your reply.

what i was looking for was an event that triggered when there was something in the clipboard, so i did not need to poll the clipboard object.

if i only want the paste option when something is in the clipboard the event approach seems obvious. i cannot find anything to do it though

sincerely
morten wilken
16 years ago
hi all,
does anyone know how to monitor if there is something in the clipboard.

i would like to enable or disable the 'paste' menu item depending on whether or not there is someting in the clipboard.

on a similar note i would also like to know how to monitor if a selection has been made in a textfield or area (in order to enable the 'copy' and 'cut' menu items.

does anyone have any leads?

sincerely
morten wilken
16 years ago
Hi,
I think your best bet is to remove the jar files from your system.jar and let webstart download all 3 jar files.
that way all 3 jar files will be in your classpath and you can access the image as you propose.
sincerely
morten wilken
17 years ago
I am looking into running our webstart client without having to sign the jars.
My main problem is that i get an access denied error when i try to read a system property that i have defined in my jnlp file, despite the fact that it says here
http://java.sun.com/products/javawebstart/1.2/docs/developersguide.html
that an unsigned webstart client has:
Limited access to system properties. The application has read/write access to all system properties defined in the JNLP File, as well as read-only access to the same set of properties than an Applet has access to.
i do not really know how to progress from here
sincerely
Morten Wilken
17 years ago
just to continue the discussion,
in my design the JTable is the view, the controller is the class where i implement the inner listener classes.
the model is the TableModel i have implemented that wraps a DataInfo[].
my question is: how does the controller change the model? do i put businesslogic methods (ie. bookflight) in the tablemodel?
today i have a businessfacade with the methods, so i could also let the controller call by facade and let the tablemodel 'observe' (with Observer) the facade. im a bit puzzled here....
what do you think?
sincerely
morten wilken
hi all,
i found my problem and just thought i would post it here if anyone else has the same trouble.
i had to put the jtable in a jscrollpane for the header of the tble to show.. not sure why, but now it works
sincerely
morten wilken
hi robin,
my code is this:
public String getColumnName(int index) {
System.out.println(fieldInfo[index].getName().trim());
return (fieldInfo[index].getName().trim());
}
i can see that the corrct names gets written to the console, so i know it gets called.
i instantiate the jtable thusly:
TableModel tm = new TableModel(di, fi);
JTable jt = new JTable(tm);
jt.setAutoCreateColumnsFromModel(true);
tablePanel.add(jt);
can you spot any problems here?
sincerely
morten wilken
hi all,
i have made my own tablemodel, but cannot get the jtable to display column names?
i have implemented the getColumnName() method in the tablemodel, and i kinda hoped this was enough.
i have also tried to do: jtable.setAutoCreateColumnsFromModel(true);
in the hope that that would help
but how do i do this?
sincerely
morten wilken
hi reid,
very lucid description of a topic that i too have westled with.
would you implement all calls to the db (which in my case is behind a facade) in the model?
and would you agree that the tablemodel is the model in this case (as the name implies)?
and thirdly, when i want to do a search i trigger an action in the controller. will this action call a method on the tablemodel, or would you make the model a listner on the controller?
sincerely
morten wilken
hi all,
if i understand correctly then, if you do not remove the synchronized from modify() then the entire database is locked for the duration of the modify method, and not just the record?
please correct me if im wrong
hmm... but perhaps this is desired, so another client cannot seek() something else in the middle of the modify operation.
sincerely
morten wilken

Originally posted by Mark Spritzler:
I would not remove the Synchronized keyword form the Data class methods.
Read these posts
http://www.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=25&t=002257
Mark

hi all,
i was wondering, my first idea was to package the entire code in one jar file, and the let a parameter decide if i was starting it as a client, a server or a standalone client, like this:
java -jar project.jar server
java -jar project.jar client
java -jar project.jar standalone
but is this in violation of what the instructions say about allowed parameters?
and if so, how do you go about it without having to package the same code in several jar files.
sincerely
morten wilken
i have read this and other threads here, and im puzzled by some of the arguments here.
i have imeplemented lock/unlock in the data class as a hashmap with recordid as key and currentThread as value.
that way i can check for the client identity based on the executing thread.
im assuming some of you guys think this is a bad idea, and i would like some pointers.
the assmuption here (which i think is valid) is that all write operations lock->write>unlock is done in one method call from the client, and so would all run in the same thread?
oh and by the way, i DO need to change the signatures of the methods in the data class so they dont synchronize, right?
concering locking in the data class itself, the way i see it there is no good reason NOT to have locks in the db when its in local mode since i see it as an integrated part of a database that has nothing to do with whether it has remote clients or not
sincerely
morten wilken