32,199 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
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() { … | |
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 … | |
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; … | |
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 … | |
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[] … | |
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 … | |
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 … | |
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); … | |
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 … | |
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 … | |
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 … | |
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) { … | |
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 … | |
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() { … | |
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, … | |
[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 … | |
[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 … | |
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> … | |
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. | |
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 … | |
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. … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 = … |
The End.