32,199 Topics

Member Avatar for
Member Avatar for libathos

I am using a JFreeChart from this link [ICODE]http://www.java2s.com/Code/Java/Chart/JFreeChartCategoryStepChartDemo.htm[/ICODE] the format of the datasetUtilities.createCategoryDataset is (new String[]{..,..,},new String[]{..,..,},data).Is there any way that i can pass an already filled arrays for countries and years? [CODE] public Chart(String tablenm,final double[][] data,String[] countries,String[] years) { super(); final CategoryDataset dataset = DatasetUtilities.createCategoryDataset( countries,years, data …

Member Avatar for libathos
0
196
Member Avatar for Dmiller071

Hi all, I have a slight problem with a java applet of mine. I play a video game that tracks realm and world ranks and I'm making this applet to put on my site to display current standings. My main problem is currently in the testing of this applet. Once …

Member Avatar for Dmiller071
0
270
Member Avatar for Dregron

Hey first time posting about code so please say if you need more information than what i give you... I'm having trouble with a timer, am trying to wait 2 secs then add 5 to Defender.Bullets but they are a delay on this and it bugs out if i keep …

Member Avatar for Dregron
0
226
Member Avatar for Hussam Alahmadi

in this assignment make the program read 10 integers and store them in an array. Then, pass this array to a method that finds the largest integer in the array, and counts its occurrences. Your method should return a string of the form largestNumber

Member Avatar for stultuske
0
140
Member Avatar for 03hasnam

[CODE]import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import java.text.*; import java.lang.*; import java.util.*; import java.io.*; public class PaymentNewGUI extends JFrame{ private JButton tenP, twentyP, fiftyP, onePound, twoPound, payButton; JTextField ticketID; Label lEntranceTime; Label lPaymentTime; Label lTimeDifference; Label lDue; Label lInserted; Label lMessage = new Label("Enter Your Ticket Number"); Container …

Member Avatar for JamesCherrill
0
1K
Member Avatar for jerrohnny

Hi Guys, Am one of those changing careers. I am retraining on an IT Conversion course at the moment and has just started java. Being a conversion program, it is running really fast and I am working really hard to catch up and fully understand, am gonna need all the …

Member Avatar for JamesCherrill
0
113
Member Avatar for dennysimon

usualy I run java app ( I create by my self) by click it's jar file. How to run it via click an icon on desktop ( how to link between icon and the jar file thank you denny

Member Avatar for dennysimon
0
581
Member Avatar for karthik.datt

The withoutcomment.txt file contains : [general] "PC", 0x0, 32, RW, reg , 1, "Program Counter (R15)"; "LR", 0x11, 32, RW, reg , 18, "Link Register (R14)"; "SP", 0x10, 32, RW, reg , 17, "Stack Pointer (R13)"; But i am able to print only first line but its not going to …

Member Avatar for stultuske
0
170
Member Avatar for ibthevivin

So basically I'm stuck at the do-while statement. Should I use a do while? or a for loop? This program is supposed to test my ability to use loops. [CODE]/*Create an application that reads an integer value and prints the sum of all even integers between 2 * and the …

Member Avatar for stultuske
0
235
Member Avatar for Traicey

Guys I have been trying to figure this out until this very moment The problem is I need a piece of code that will not allow the user to enter any negative number in the text box This how it should work, if the user trries to enter this "-" …

Member Avatar for stultuske
0
164
Member Avatar for matrixcool

Hello, I have a file and this it how it looks like: 6 {a, b, c, d, e, f} 1 1 1 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 1 1 1 1 0 1 …

Member Avatar for zeroliken
0
2K
Member Avatar for janvi.dodia

Hi everyone.. i m developing an application to backup files\directories to a server.. i initially developed it in RMI but then to make it possible to run over Internet i made some modifications and used sockets.. I have designed few packets for sending login details, file information to be backed-up, …

Member Avatar for zeroliken
0
1K
Member Avatar for matrixcool

Hello, I have a file and this how it looks like: 6 {a, b, c, d, e, f} 1 1 1 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 1 1 1 1 0 1 1 …

Member Avatar for matrixcool
0
245
Member Avatar for 03hasnam

[CODE]/*********************Pay Button Listener***************************************/ public class payListener implements ActionListener{ public void actionPerformed(ActionEvent e) { replace(); Ticket getNewPayTime = new Ticket(); getNewPayTime.loadTicket(ticketIDNumber); paymentTime = Ticket.paymentTime; //getting correct ticket pyament time, correction performed by replace method. long timeDifference = paymentTime - entranceTime; SimpleDateFormat sdf1 = new SimpleDateFormat("MMM dd,yyyy HH:mm"); Date paymentdate = new …

Member Avatar for NormR1
0
142
Member Avatar for moonL!ght

hi im having this error i dont now where is the mistake can you halpe me? this is the exception: java.lang.NullPointerException at shape.shape.<init>(shape.java:14) at shape.rectangle.<init>(rectangle.java:17) at shape.listOfSHAPES.init(listOfSHAPES.java:73) at sun.applet.AppletPanel.run(AppletPanel.java:424) at java.lang.Thread.run(Thread.java:619) these are part of my code were it show the error list of shapes class:[CODE] else if(shape.charAt(0)=='R'||shape.charAt(0)=='r') { int …

Member Avatar for stultuske
0
207
Member Avatar for Artmann

Hi I've been working with Java for a while now but there's one basic thing I still don't understand. Java got 4 Access Modifiers [LIST] [*]Default [*]Public [*]Private [*]Protected [/LIST] I know the difference between them, the thing is I don't now why you should use different Modifiers. Wouldn't it …

Member Avatar for Ezzaral
0
150
Member Avatar for ziadkassam

Hi, please, I want the shortest path algorithm using arrays (Data structure) and the path passing through all the points once and return back to the initial point. ex: 0-1-4-2-3-5-0 (path cost=10) 0-3-2-5-4-1-0 (path cost=15) so 0-1-4-2-3-5-0 is the correct answer.

Member Avatar for ziadkassam
0
78
Member Avatar for thejoker011

Hey guys....Namastey!! Am here for your suggestions. I am right now working on a software project which needs to communicate with an custom ECU(Engine/Electronic Control Unit) of a car via a USB-TO-RS232 cable. Before moving ahead i want to be sure, [B][COLOR="Red"]do you think Java is appropriate for such kind …

Member Avatar for thejoker011
0
378
Member Avatar for gourav1

hey! i m reading java. and at one place i have read Audio interface in which play(), loop() functions are defined,but interface is something in which there can't be any method defined. so this must be abstract not interface.so please tell this problem, y we are calling this as interface. …

Member Avatar for thines01
0
266
Member Avatar for Mr.BunyRabit

i got an example form roseindia on how to send an email. Now it works perfectly like this, and i can send mail to my email adress with that code (thats just a part of it) [CODE]String host = "192.168.1.14"; String from = "Admin@Admin.com"; String to = "myEmailadress.com";[/CODE] but the …

Member Avatar for Mr.BunyRabit
0
429
Member Avatar for horizondesai

Hi everyone. I'm using jwt 2.5.2 and new to it. I want to create a table (rows & columns) in it. Is this possible with jwt 2.5.2 ? Is there any data type like 'TableItem' ? What is Also, what is character for tab-space in it ? '\t' doesn't work …

Member Avatar for horizondesai
0
161
Member Avatar for gourav1

i m not getting how to play a mp3 file using applet? i m using AudioClip A = getAudioClip(x); where x is --> URL x=C:'Users'gourav'java_pr; its just a try! i donot know how to use this. it is showing error. tell me how to use audioclip interface?

Member Avatar for stultuske
0
98
Member Avatar for Jenna1994

hi im jenna and i have been learning java i have to write a program that does the stuff listed below i have tried multiple times but i am not getting it right:'( i dont understand what to do please help me :( i have to hand it in to …

Member Avatar for stultuske
0
204
Member Avatar for gsingh2011

I came across a program a program called Enounce MySpeed which allowed me to watch videos (my school lectures) at a faster rate. I was able to watch 60 minute lectures in 25 minutes, so this software was extremely valuable to me. However, this software is shareware, which is dumb, …

Member Avatar for ~s.o.s~
0
115
Member Avatar for Jenna1994
Member Avatar for DavidKroukamp

For now the code isn't to complex. Built in Netbeans 7 java 6.... just the basis for now but its very safe connection so thought i'd post it for anyone who needs it. A quit command may be sent to any client by specifying its ID and then press enter …

0
431
Member Avatar for H_o_p.e

plz help me How to link Access data base with java code. [CODE] public class DataBaseCon { public static void main(String a[]) throws Exception{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=DriverManager.getConnection("jdbc:odbc:DataBase"); System.out.println("Sucessfully Connected "); Statement st= con.createStatement(); ResultSet rs= st.executeQuery("Select empid,ename from emp"); while(rs.next()){ System.out.print(rs.getString(1)); System.out.println(rs.getString(2)); } st.close(); con.close(); } } [/CODE] Exception in …

Member Avatar for DavidKroukamp
0
463
Member Avatar for crazymidget01

I am new to using swing. I am trying to get a picture to be displayed in a Jframe when a button is pressed. I cannot figure out how to make this work. This is what I have so far: [CODE] import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.awt.image.BufferedImage; import …

Member Avatar for mKorbel
0
1K
Member Avatar for libathos

I'm using a JFreeChart which I found in this link [ICODE]http://www.java2s.com/Code/Java/Chart/JFreeChartCategoryStepChartDemo.htm[/ICODE] I have modified the code as given below.My problem is how i can change the values in the x-axis so that they don't start from the zero. [CODE]public class Chart1 extends JPanel { /** * */ private static final …

Member Avatar for libathos
0
226
Member Avatar for Swirly

I am running into a problem in a card dealing program. When the Deck Constructor tries to run one of the methods associated with the Applet class, the program will fail with an error set typical to running an application as an applet. This is a school project, and the …

Member Avatar for NormR1
0
208

The End.