Haina Minawa

Ranch Hand
+ Follow
since Oct 13, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Haina Minawa

Jay Orsaw wrote:Okay so I have a class that I built about 160 menu items. I was curious if it's possible to be able to save that gui info and transfer it from Java SE to EE? I don't even think I can copy the code since the gui code is not editable... Even redoing the parts of code isn't an issue, it's the gui builder part I'm more worried about. It took a lot of time to do this, so I don't want to waste more.



Hi, I am not sure I fully understand what you mean by "from Java SE to EE"?
I guess you want to convert menu items from a Swing app to a JSP page? If so, it is impossible because in JSP you have to use Javascript/HTML to build the menu which is very different than Swing's menu items.
It suggested that you should see the server.log for more details. What did you see ?
12 years ago
No, the JAR files would be stored in C:\Documents and Settings\UserName\Local Settings\Application Data\Sun\Java\Deployment\cache
Check for the correct path in Java Plugin settings.
12 years ago
Multithreading has its own niche and sometimes we couldn't move forward without it. Here is some common tasks that need to be done in multi-threads:

- Avoid GUI freezing when running a long operation in the background, such as compressing files, scan files & directories, ... The background tasks should be executed in separate threads other than the Event Dispatching Thread, otherwise, the GUI will freeze.

- Upload/Download many files at once, this need be done by multi-threads for maximum speed.

.. and much more.
Hi, which RDBMS are you using? Did you catch the exceptions?
12 years ago

vipul bondugula wrote:

As the other jsp file(suppose named as otherFileName.jsp) is in the same directory can i write only otherFileName.jsp in the url , or else should i write from context path onwards.



Things are simple, within a web app you should use relative paths as suggested by Bear. Even you can use relative paths for files that are not under the same directory, as long as they are within a web app.
12 years ago
JSP
Double check to make sure the org.nissan.abhi.dto.Cars file is present under WEB-INF/classes directory.
12 years ago

Michael Cropper wrote:Previously when I was using a normal Statement object to update DB I created a class "UpdateDatabase" which took arguments of (tablename, setdata, wheredata) which I then used to build the SQL statement.

So my question is, when using PreparedStatements instead, is it is a good or a bad idea to do something similar?

Since I have two options

Option 1
Build a separate class for each specific update statement I want to run.

Option 2
Build one flexible class which takes the arguments as my previous one did.

So the question is, which is the best option technically, and why?

Thanks
Michael



In my opinion, it's hard to tell which way is the best, but the option 2 is more flexible, using PreparedStatement.

Kasun Liyanage wrote:

i cannot understand how they have put Arrays.toString() like that, without first creating an Arrays object. Are java.util' classes are always used that way? Please explain.



Here is the Java doc for Arrays.toString(Object[]) method:


public static String toString(Object[] a)

Returns a string representation of the contents of the specified array. If the array contains other arrays as elements, they are converted to strings by the Object.toString() method inherited from Object, which describes their identities rather than their contents.

The value returned by this method is equal to the value that would be returned by Arrays.asList(a).toString(), unless a is null, in which case "null" is returned.

Parameters:
a - the array whose string representation to return
Returns:
a string representation of a

12 years ago
I also don't see any big problems in my team which is using both Eclipse and NetBeans.
Hi, you should put the log4j.properties file under project directory, not under src directory.

J Ellis wrote:Hi all,

I have an applet that calls a bunch of pojos to eventually read in image files and display them. I had everything working on my old machine but rebuild when my hard drive went bad, and I cannot remember how to get around the access control to read a file on the local machine. Even though I have self-signed the .jar file, I keep getting a java.security.AccessControlException: access denied ("java.io.FilePermission"... error. I believe the self-signing works because if I use the .jar file before I sign it I get a different error (java.security.AccessControlException: access denied ("java.util.PropertyPermission" "com.sun.media.jai.disableMediaLib" "write")). The jarfile contains a policy file granting all permissions in its root, but at this point I can't even remember if I was using a policy file before or not.

I checked out https://coderanch.com/how-to/java/HowCanAnAppletReadFilesOnTheLocalFileSystem on here, but it says that if a jar file is signed then it should have full permissions. What am I doing wrong here?

Would someone kindly point me in the right direction?

Thanks!



Do you create a new SecurityManager in your applet? I got the similar problem and solved it by setting the security manager to null.
12 years ago

Tien Shan wrote:I have butons, combo boxes, etc, that I want to put in 3X3 row and column.
I used gridbag layout and they distributed themselves sparsely, and the two columns on the right and on the left are uncomfortable close to the panel boarder. I want to put some space between the 1st and the 3rd row and the edge of the panel.
In other words, I want to put them closer to the 2nd row in the center. I tested weightx property, but did not get it as per my wish.

If you have any tips, please let me know. Thank you.



use an inset (it is something like padding)

constraints.insets = new Insets(10, 50, 10, 50);
12 years ago
Hi,

There is a lot of ideas, and here is mine: A backup program that backups data from local computer to a remote server.
12 years ago

ajse ruku wrote:Hi,

I need to use html:checkbox but it does not have checked attribute. How can i implement this. Please advice.

regards,
ajse



use the property value="on".
12 years ago