35,617 Topics

Member Avatar for
Member Avatar for server_crash

I have a JMenu with some radio buttons...For some reason, when I click the stupid things, they won't do anything...and by that, I mean they want change their state to being clicked(as in the circle being filled)..It's like they are disabled...I'll post the snippets of code with them in it: …

Member Avatar for server_crash
0
136
Member Avatar for mastap

I am using java server pages and connecting it to a simple access database. I have a form with about four columns in it. Two of the column are already filled out and the other two need filling out. In the two empty columns there are text boxes which allows …

Member Avatar for mastap
0
93
Member Avatar for server_crash

Let's say I have two classes, Class1, and Class2..... Class2 creates and instance of Class1 and calls one of it's methods like this: [Code] Class 2 { Class1 c1 =new Class1(); c1.myMethod(); } [/Code] Now, that would work...But, could you have just the class variable instead of the class instance …

Member Avatar for server_crash
0
92
Member Avatar for George2

Hello everyone, Suppose I have a method which is a synchronized method (for example, method Foo in the following code block), and in this synchronized method another method which is not synchronized is invoked (for example, method Goo in the following code block). I am wondering when executing in Goo …

Member Avatar for George2
0
168
Member Avatar for freesoft_2000

Hi everyone, I have a question about key events. In the key events they have some values called as follows: static int KEY_LOCATION_LEFT static int KEY_LOCATION_NUMPAD static int KEY_LOCATION_RIGHT static int KEY_LOCATION_STANDARD I have seen the api and the explanation of what the above values represent and still do not …

Member Avatar for jwenting
0
68
Member Avatar for Mooonky

I took a course in C and now im into java. I never created anywith graphics in C. I need to finish a program in C that makes a red ball appear on a blue background and then move down and up the screen. Any information of how to at …

Member Avatar for Banderson
0
2K
Member Avatar for Gink

Can applets display images on the viewers hard drive somehow? If so how would I do that? And if I dont know the filenames but I know the directory, is there a way to do it?

Member Avatar for jwenting
0
93
Member Avatar for Lord Felix

Well once again I have some trouble getting my lab to work. I am currently having trouble on an algorithm that is supposed to count the neighbors next to a cell in a Two-dimensional array which is supposed to resemble with the algorithm of Conway's Game of Life. For some …

Member Avatar for Lord Felix
0
195
Member Avatar for rickste_r

Hi peeps, I was wondering if anyone could help me. Im using a [B]JEditorpane[/B] to display a html page in. What I want to do is to change the font colour of the html page. I have tried to use the [B]setCaret()[/B] method, but to no avail. Anyhelp would be …

Member Avatar for server_crash
0
62
Member Avatar for freesoft_2000

Hi everyone, I am trying to save the contents the of the jtable together with all its fonts and everything else. The program compiles without any errors but When i try to save the contents of the JTable an exception is thrown in the tablesaveas method in the below method …

Member Avatar for freesoft_2000
0
116
Member Avatar for Mathsniper

I had installed MinGW-3.2.0-rc-3.exe and i was trying to compile a simple code: [code] public class HelloWorld { public static void main(String args[]) { System.out.println("Hello, World"); } } [/code] then i typed this command under vim, !java d:\progsaved\java\jdk\HellWorld, before i typed this !javac d:\progsaved\progsaved\java\jdk\HelloWorld.java to generate class file. The errors …

Member Avatar for jwenting
0
94
Member Avatar for server_crash

I have the datasoure and drivers set up, but for some reason this code is not updating the database. [Code] import java.sql.*; public class TestCreateCoffeeTable { public TestCreateCoffeeTable() { } public static void main(String[] args) { try { String createStatement; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String dataSource = "jdbc:odbc:Coffeebreak"; Connection con = DriverManager.getConnection(dataSource); Statement …

Member Avatar for server_crash
0
141
Member Avatar for freesoft_2000

Hi everyone, I have a question about threads. Consider the below program [code] public class test { public void test1() { System.out.println("Test 1"); } public void test2() { System.out.println("Test 2"); } public void test3() { System.out.println("Test 3"); } public static void main(String args[]) { test a = new Jtest(); a.test1(); …

Member Avatar for jwenting
0
103
Member Avatar for mus_203

Hi I need to write a method that will rotate the elemnts in an array by a factor of k. ie shift each element k places to the right. Here is the question i have been set [B]In the class ArrayLinearList a linear list is represented in an one-dimensional array …

Member Avatar for mus_203
0
213
Member Avatar for George2

Hello everyone, I want to know which method owns the lock of a specific object (some of my methods are blocked because they can not achieve the lock of a specific object, and I am wondering which method owns the lock to solve the deadlock issue). Does anyone know how …

Member Avatar for George2
0
83
Member Avatar for George2

Hello everyone, I am looking for a light-weighted Web proxy in Java which can enhance the performance of my web server. I want it to be written in Java so that it can be used on any platform. I want to place the Web proxy between a specific Web server …

Member Avatar for George2
0
106
Member Avatar for freesoft_2000

Hi everyone, I have a jtable and i need a way to be able to merge or to split the cells(both the rows and columns) selected by the user. I have seen the table model and jtable apis' and there seems to be nothing about this. I would appreciate it …

Member Avatar for jwenting
0
104
Member Avatar for Ryan L.

Hello, I am a java/html novice. Actually I have no clue as to what I am doing. Currently I have some java applets that communicate with a server and display data based upon what state the equipment is in. Say an input to a system is true it will display …

Member Avatar for freesoft_2000
0
177
Member Avatar for MrScruff

Hey guys n girls, I have two arrays (one for x and one for y axis) which contain labels i would like to display on a graph. How do you recommend i do this? I was thinking multiple JLabels, spread out depending on the quantity. But If theres a better …

Member Avatar for MrScruff
0
100
Member Avatar for Gink

Topic is misleading I edited it. What would be the best way to put a period at the end of a sentence without just adding it to the last word or last variable etc. Like say i had String s = "Hello I am a sentence"; what would be the …

Member Avatar for jwenting
0
134
Member Avatar for jenman77

I am taking a basic java programming class. Unfortunetly it is an online class, and I am unable to find a tutor. We are using the book Java How to Program sixth Ed. and are going through two to three chapters a week. I am soo lost!! My next lab …

Member Avatar for jwenting
0
185
Member Avatar for anaillvn2002

I am running windows 98 on a Gateway computer. The problem I am having is when trying to install Java I keep getting Error Message 1311 Source file not found. I have tried more than one Java program and it keeps happening. Please help.

Member Avatar for jwenting
0
153
Member Avatar for server_crash

I'm curious as to how many of you routinely use jdk 1.5 tigers added features, methods, api's and whatever. Or, do you just stick to 1.4?

Member Avatar for nanosani
0
166
Member Avatar for cdt1983

Hi, I have been trying to solve this problem for a while now. I wrote a program that analyzes 3 numbers entered by a user. All calculations are working fine. Now I am attempting to use 'if' statements to display the largest and smallest number entered. I am adjusting the …

Member Avatar for Gink
0
103
Member Avatar for Mooonky

I need the ball to move down until it hits the end of the blue rectangle then move back up until it hits the top and repeat forever. What's wrong with my code? [code] //This applet draws an animated bouncing ball with uniform speed. //The ball starts at the center …

Member Avatar for Gink
0
147
Member Avatar for freesoft_2000

Hi everyone, I have a question to ask about printer attributes. I am using the PrintRequestAttributeSet class and am a bit confused as to whether i will still have to use the PageFormat class to set the page format of my printed page. See this below function [code] public void …

0
37
Member Avatar for freesoft_2000

Hi everyone, I am trying to center a page number on the bottom center on a printed page but i am having some trouble doing it. I am using the windows default page dialog where the user can select the desired page size(ie, a1,a2,a4) but i am unable to center …

0
67
Member Avatar for kharri5

I have a few problems. I want to read in a .dat file with characters like below: A B C B * D D * J J * * i used a readLine() from a fileReader, and put all of the characters into a char array. Then i want to …

Member Avatar for jwenting
0
88
Member Avatar for mikeandike22

is there a way that i could run java on a windows 95 machine. right now dont know all the specs will get back to you on that. the reason i want to know is a recently got a book on how to code java only problem is my computer …

Member Avatar for jwenting
0
52
Member Avatar for pooja sachdev

I am doing a project on sending & retrieving sms via java.pls tell me the source code as i am not able to use AT commands in program.

Member Avatar for jwenting
0
123

The End.