32,199 Topics

Member Avatar for
Member Avatar for JanieRae

I've just started programming, and I'm taking a java class as one of my electives this year. We have a program due tomorrow and I'm very much lost. I think i know what I want to do, but I don't understand the concept or know enough code to get everything …

Member Avatar for jwenting
0
139
Member Avatar for Deeps83

Can anyone tell me if we can set uneven interval for range axis in JFreechart? If yes hw can I do that? Actually I want the scaling to be something like 0,10,20[B],30,35,40,45 [/B]50,60,70,80 .. Thats in the beginning and at the end the scale interval is 10,but in the midrange …

0
30
Member Avatar for jiraiya

Hi all, Does anyone know of a way to scan a character from the command line without the enter key having to be pressed? For example, the user would type 'a', which is then picked up and scanned by the program and stored, etc. The only way of scanning input …

Member Avatar for jiraiya
0
139
Member Avatar for unique88

Hi, I'm currently in a the process of making a connect4 game, but what is highly frustrating is that im trying to write a loop that takes i from 0 up to the NUM_COLUMNS. and then make the new object called Connect4Column. When I compile and run this it gives …

Member Avatar for javaAddict
0
104
Member Avatar for pradeep2010

My program is used to perform a salami attack on the database Whenever i run the program the compiler display the following message Invalid Cursor state on line 29 [CODE]import java.sql.*; //import java.io.*; class SalamiAttack { String ssql1,ssql2,usql,temp="",buffer=""; Connection conn; Statement st; ResultSet rs1; int index=0; float tempfraud,fraud,zigacc=0; SalamiAttack() { …

Member Avatar for javaAddict
0
206
Member Avatar for justbelieve87

I'm new to java, so please be kind if I'm not making any sense or making a rookie mistake! But I have been working for HOURS trying to figure out where I'm going wrong to no avail. I'm pretty sure I'm just missing something really simple, but hopefully someone here …

Member Avatar for tiny7415
0
163
Member Avatar for mackychan12

plese help..what is the poblem about this codes?\ [CODE] public abstract class Employee{ private String firstName; private String lastName; private String socialSecurityNumber; public Employee(String first, String last, String ssn){ firstName=first; lastName=last; socialSecurityNumber=ssn; } public void setFirstName(String first){ firstName=first; } public String getFirstName(){ return firstName; } public void setLastName(String last){ lastName=last; …

Member Avatar for tiny7415
0
151
Member Avatar for ubi_ct83

Hi all, FYI im really new in Java.last time my project was in C but suddenly my supervisor changed to Java.i got the code from him (see below).wanna ask u guys how to learn Java and these means? Lastly, how to create dropdown menu? [CODE] import java.awt.Color; import java.awt.Container; import …

Member Avatar for tiny7415
0
114
Member Avatar for bigbags911

it works but instead of it reverseing the characters i want it to do this "This is a test.” should be reversed to read: “test. a is This” i want it to do all this in a text file [code]import java.io.*; import java.util.*; public class reverse{ public static void main(String[] …

Member Avatar for bigbags911
0
131
Member Avatar for jenjenjenjen

Hey guys and gals. Like I said in my last post I am in college. Well I wrote a program and a friend who majored in computer science said that my program will work... Well it does but doesnt do like I want. I am in need of advice using …

Member Avatar for kvass
0
64
Member Avatar for bugnotme

Hi all, I'm currently developing a java program that executes XPath 2.0 statements using the library Saxon. I have i problem doing some operations with dates. I'm using this XML for testing purposes. As you can see the dates are in format 'YYYYMMDD', i need to retrieve the latest one …

0
68
Member Avatar for mackychan12

please help me about this program...i dont how to sort the even numbers inputted. [CODE]import java.io.*; import java.util.*; public class mp5{ public static void main(String[ ]args) throws IOException{ BufferedReader br=new BufferedReader (new InputStreamReader (System.in)) ; int num=0,sum=0; String snum; System.out.print ("Enter size of Array: "); snum=br.readLine( ); num=Integer. parseInt( snum); …

Member Avatar for rue64ja
0
195
Member Avatar for albert101

Hi everyone, I am new to Java and more recently Swing. I was wondering if anyone would be able to show me a way of inputting a value into a text box, and being able to use this to calculate a sum for example. Also I am interested to know …

Member Avatar for albert101
0
87
Member Avatar for BuhRock

Can someone help me with error trapping. For instance, if I asked the user to input only a numeric type, 0-9. Then how would I go about creating an error message if the user inputs "hey." I know that I could easily use the Try, Catch statements but I want …

Member Avatar for chaospie
0
136
Member Avatar for mytime19

Hello Everyone, I am trying to extract integer values from 2 int variables i have created in my database table "mytab". The data or table values i have extracted on console and its working fine. But i want to use the values as x,y coordinate for my label i have …

Member Avatar for mytime19
0
809
Member Avatar for dirnthelord

Here is the thing. This code segment is supposed to add the Subject Codes for Student each time I change the Student ID from [I]jcmbDIT [/I]combo box. Initialization works well. and after I handled [I]NullPointerException[/I] subject codes are loaded into the [I]jcmbSubCode[/I] combo box correctly. [CODE]private void jcmbDITActionPerformed(java.awt.event.ActionEvent evt) { …

0
89
Member Avatar for Yeen

I have to use a queue in an solitaire assignment, but I'm having some trouble using the linked list Queue class that I made. It won't take arrays at all. [code] class Testing { public static void main (String [] args) { Queue testlist = new Queue(); // testing Queue …

Member Avatar for lafigueroa
0
793
Member Avatar for xzero_x

class Employee { private String last; private String first; private String title; private int age; static int count = 2; public Employee() {++count;} public Employee(String last, String first, String title, int age) { this.last = last; this.first = first; this.title = title; this.age = age; } public String getLast() { …

Member Avatar for jwenting
0
103
Member Avatar for Aissi

Hey, I'm having problems with JTextPane, I have class which has gui and other class for the software logic (in this case text editor), so when I try to save a file using filechooser it works fine to the point where it needs to save the information from the JTextPane, …

Member Avatar for javaAddict
0
70
Member Avatar for pateldeep454

[COLOR="Red"] This is my assignment: [/COLOR] The field of calculus is largely concerned with the concepts of the derivative and the integral of functions. Derivatives and integrals are closely related because they "undo" or reverse one another. If the derivative of a function is taken, a new function is obtained …

Member Avatar for javaAddict
-1
755
Member Avatar for JellyTurf

[CODE]import java.util.Scanner; public class ticTacToe { public static char[][] board = new char[3][3]; public static getMove(int turnNumber) { char choice = ' '; if (turnNumber % 2 == 1) { //x's turn System.out.println("X's Turn."); char choice = 'x'; System.out.println("Which row and column would you like to choose? (enter number for …

Member Avatar for phoenix911
0
206
Member Avatar for java_programmer

Hi, I am new in Spring. While trying to create aspect using AspectJ annotation, I am getting following error. My configuration file is as follows: <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xsi:schemaLocation="http://www.springframework.org/schema/beans [url]http://www.springframework.org/schema/beans/spring-beans-2.0.xsd[/url] [url]http://www.springframework.org/schema/aop[/url] http://www.springframework.org/schema/aop/spring-aop-2.0.xsd"> <bean id="audience" class="src.com.spring.Audience"/> <bean id="steve" class="src.com.spring.Juggler"> <property name="beanBags"> <list> <value> "1" </value> <value> "3" </value> </list> </property> …

Member Avatar for java_programmer
0
184
Member Avatar for bagabont

Hi there, I am making a mail notifier application, runnable JAR, which has a file in which i save the settings like username, password, etc. I wonder if i can save them inside the JAR itself with no external file.

Member Avatar for masijade
0
30
Member Avatar for claudiu_is

I'm trying to get live feed for my server from this page [URL="http://dkm.inx-gaming.co.uk/stats/server.php"]http://dkm.inx-gaming.co.uk/stats/server.php[/URL]. As you can see, when it first loads, it says "Querying Server x, Please wait.." for a fraction of a second.. And that's what the [B]openConnection[/B] function returns, too. Is there any way I can tell it …

Member Avatar for masijade
0
1K
Member Avatar for manikr1973

Hi, In one of my vb.net 2008 application i have called a java class file through batch process which creates txt file and jar file and put in app path folder. When i run the application it creates only txt file in the app path and not the jar file. …

Member Avatar for Renukavani
0
220
Member Avatar for JellyTurf

i really need help with this error. it is an unexpected types error [CODE]public class ticTacToeDemo { //use a 3X3 array for the game board. private static char[][] board = new char[3][3]; public static void main(String[] args) { int turnNumber = 0; System.out.println(board[1][1]); newGame(); while(!winner()) { turnNumber += 1; if …

Member Avatar for phoenix911
0
104
Member Avatar for Web_Sailor

Hi.. :?: I have written a program that reads a file and loads it into the 2D matrix but the problem is that it only loads the first line into 2D Matrix and duplicates the same. Can somebody point out the mistake. Here is my input file[CODE]14 12 5 4 …

Member Avatar for Web_Sailor
0
136
Member Avatar for vobiahu

i am trying to create a program that will enable me play the hangman game and I am not meant to use arrays. What should I do and how do I go about this. you get 5 tries and when your tries are all used you lose and then a …

Member Avatar for lafigueroa
0
84
Member Avatar for ndeniche

Hello guys... I'm trying to develop an application with a GUI that sends and receives data via http, by sending a url via POST and eading the content generated by the url. or instance, if i send a nick and order number, the server generates a SessionID via html. My …

Member Avatar for ndeniche
0
208
Member Avatar for mytime19

I am trying to draw stars/asterisks but i can't. Any idea? [CODE] import java.io.*; import java.awt.*; import javax.swing.JPanel; import javax.swing.*; public class kmd1234 extends JFrame{ kmd1234(){ JFrame f; JPanel p; JLabel l; int x,y; f = new JFrame("my frame"); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); p = new JPanel(); p.setPreferredSize(new Dimension(512, 512)); p.setBackground(Color.WHITE); l = …

Member Avatar for mytime19
0
92

The End.