17/11/2018 12:08
I have a JTextArea wrapped in a JScrollPane, and when I append a lineto the text areaI want the scroll bar to adjust so that the new line is seen in theviewport. I havesome code that seems to work most of the time, but every once in awhile it doesnot work properly. I think I'm probably not doing this the right way.
Here's a codesnippet that shows what I'm doing: JPanel consolePane = new JPanel();JTextArea consoleTextArea = new JTextArea(35, 65);JScrollPane consoleScrollPane = new JS.... read more

2 answersclick here to view

15/11/2018 12:08
to upload via ftp: .class -- binary or ASCII?web.xml -- binary or ASCII? thank you.. Frances

3 answersclick here to view

14/11/2018 12:08
something I came up with on my own This may be a little tough for me as a starting project in Java, but here goes Create a chess board simulator.
There are two teams black and white.
Each team is composed of the following pieces: * 8 Pawns * 2 Rooks * 2 Bishops * 2 Knights * 1 King * 1 Queen Each piece has the following moves available: * Pawns o Forward 2 spaces on the first move o Forward 1 space on each subsequent move except for a capture.... read more

4 answersclick here to view

13/11/2018 12:08
Hi all, I need some advice in deciding the technology stack for my project.
We have a new project to start with.
We are planning to use a combination of struts+hibernate. Will thissuffice all our needs. We are comfortable with JSP, and Servlets.
webserver is tomcat and database is ms sql.
The reason behind this mail is, when I searched in google I got manyprojects which are a combination of struts-spring-hibernate. Is itpossible to complete the project with a struts-hibernate framework? -Thank.... read more

2 answersclick here to view

12/11/2018 12:08
Hi, all, What I need to do is to convert the following VB code to java. In theVB code, the code converts the data obtained from the database into auser-defined type (UDT) structure, copies that UDT to another UDTdefined as a single string, then passes that string to the clientcomponent. The UDT can include any fixed-length datatype. Performing amemory copy of that UDT to another UDT defined as a stringautomatically manages the datatypes in the string.
E.g. I need to copy the entire UDT structure.... read more

2 answersclick here to view

11/11/2018 12:08
Consider the following program snippet: final long m = getSomeLong(); // strip off sign bitfinal long n = m & 0x7fffffffffffffffL; What simple change would drastically improve this code? Why does itimprove the code?

3 answersclick here to view

10/11/2018 12:08
I had to reinstall Windows 7 in order to get PostgreSQL to install.
Now ant can't sign jars anymore.
How does Java go about finding .keystore? It does not seem to be asystem property.
M. Gallant probably knows, but his code-signing cert has expired, sohe is probably not around.

1 answersclick here to view

09/11/2018 12:08
I am using Windows XP, j2sdk1.4.2_05, Tomcat 5.5.10.
When I try to start the Tomcat service on port 8080 I get a message Service Manager is attempting to start the following service... ApacheTomcat Then the message dissapears and the service does not start.
Also, when I try to go in the configuration, and change the service tostart automatically, when i press ok, nothing changes.
There is nothing in the Apache error log.

4 answersclick here to view

08/11/2018 12:08
Hello again. I have a JList that is populated in the following format: 4 - John Doe2 - Bob Dole6 - Me You etc.
The number is a user ID tag that aligns with a database User_ID field. I want to determine the user_id of the person from the list using the ID number in the String.
I was thinking of parsing the String, but that seems like a lot of work to get one number...The last time I had to parse something was in a compiler construction class 10 years ago. Terrible memories from that class....... read more

1 answersclick here to view

07/11/2018 12:08
I'm having a problem with URL parsing. If I construct a URLwith a user name and password, where the user name contains an @ I get amalformed URL exception. For example, if my parameters are: user name = bob@usernet.com password = password host = ftp.test.com and I try to construct a URL: URL connection = new URL(ftp://bob@usernet.com:password@ftp.test.com); I get a malformed URL exception. Even though I can connect to the hostwith any FTP program or web browser using .... read more

3 answersclick here to view

03/11/2018 12:08
I cannot get my program to load an image and display it. I have readseveral forums and help sites and have used all the code regardingmediatracker, but for some reason, it simply will not load my images.
I have also tried multiple combinations of how I insert the filename. Below is the code I got from a website that seems like itshould work, but it won't. I have Windows Vista on my computer...isit possible that is part of the problem? Below is the code I cannotget to work that I got from.... read more

3 answersclick here to view

30/10/2018 12:08
Hi, Does anyone have info on web hosts that let you run your own Java chatserver on the host machine? I am volunteering for a mentor program for kids that has a website,chumz.net hosted on Yahoo. I found a free Java chat server and clientprogram called Babylon (http://visopsys.org/andy/babylon/) thatenables users to send text as well as share a paint canvas. This isreally nice and I would like to use this if possible.
Only problem is I can't find web hosts that let you run such a chatserver.... read more

1 answersclick here to view

29/10/2018 12:08
Hi all, I am looking for a simple way to play a sound clip (.au file) in a javaapplication (not applet). AudioClip in java.applet seems to require URLs forclips, and the Java Sound API looks a little too elaborate for what I amtrying to do. All I need is for this .au file to be played once insideanother method. Can anyone give me some pointers here? TIA

3 answersclick here to view

26/10/2018 12:08
Hi there I am involved in writing an applet. The question I have involves InternetExplorer and Java.
Is it possible to easily switch between JVMs in Internet Explorer? There isan options pane where it is possible to select a checkbox under the titleJava (Sun), the checkbox has the name Use Java 2 v1.3.1_09 for <applet>.
But I have several versions of JVM installed on my machine, why are they notalso listed here? (If you think this question more rightly belongs in a microsoft newsgroup,the.... read more

7 answersclick here to view

25/10/2018 12:08
Does anybody know the hashing algorithm that Object.hashCode() uses? Is it worthwile writing your own implementation of this function for your own objects?

1 answersclick here to view

eDiscover
Helpforce eDiscover provides technical articles updated each day
Click the logo to go back to the main page
Java

Helpforce eDiscover RSS feed contains the latest technical articles in RSSWe have a vast archive of technical informationJava is a programming language developed by Sun Microsystems (which has since merged into Oracle) and released in 1995 as a core component of the Java platform. With many innovative features, Java is currently one of the most popular programming languages in use, particularly for client-server web applications, with a reported 10 million users.

Search eDiscover
  
Categories

Click an icon to go to that category

Helpforce eDiscover contains articles about Microsoft Windows Helpforce eDiscover contains articles about Apple products and MacOS Helpforce eDiscover contains articles about Linux and POSIX operating systems Helpforce eDiscover contains articles about Helpforce Helpforce has a large variety of technical information and articles for you to read Helpforce eDiscover contains articles about databases, MYSQL, SQL Server Oracle Helpforce eDiscover contains articles about Java, JVM and the JRE Helpforce eDiscover contains articles about the QNX operating system Helpforce eDiscover contains articles about Oracle Solaris and Open Solaris Helpforce eDiscover contains articles about RISC OS, Acorn and the BBC Micro Helpforce eDiscover contains articles about Amiga and AmigaOS