35,588 Topics

Member Avatar for
Member Avatar for Vaspar

Hi Guyz I am making a Software for my friend Gold Shop ... Which Convert Units and Calculate Prices.. I want to make Jar file.. I made it by searching it on google but it doesn't include images i used in project [quote]BufferedImage image; image = ImageIO.read(new File("C:/img/gold.png")); .setIcon(new ImageIcon("C:/img/con1.png")); …

Member Avatar for stephen84s
0
137
Member Avatar for anuj_sharma

Hey Guys, I have the following code. [CODE] public class Main { static int a = 3; static int b; static void math(int x) { System.out.println("x = " + x); System.out.println("a = " + a); System.out.println("b = " + b); } public static void main(String[] args) { math(100); } static …

Member Avatar for stephen84s
0
102
Member Avatar for nHulk

Hello, I am final year student.I am doing project on Remote Desktop Viewer and Controller in JAVA. Similar to Team Viewer .I want to add some New Features that are not in Team Viewer.[B]So plz suggest some new features that can be added that are not in Team Viewer.[/B] [B]Also …

0
65
Member Avatar for wonder_laptop

I am working with mobile agents, i got two .java files: HelloAglet.java and MyDialog.java they both depend on each other, i put them both on the desktop (same directory) and im trying to compile them using the following command: %JDK_HOME%\bin\javac -d %AGLET_HOME%\public -classpath %CLASSPATH% *.java and im getting the following …

Member Avatar for wonder_laptop
0
145
Member Avatar for kingofdrew

I don't know why but nothing is appearing? I suppose to have a applet of a house. [CODE]import javax.swing.*; import java.awt.*; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.*; import java.applet.Applet; import java.awt.Graphics; public class color extends JApplet { public void init() { addMouseListener(new MyMouseListener()); getContentPane().setBackground(Color.white); } public class MyMouseListener implements MouseListener …

Member Avatar for JamesCherrill
0
184
Member Avatar for mhariharasudan

Hi all, I am new to java swing programming.I want to develop an application which has a panel with an array of grid points(not grid cells). The number of columns and rows of the grid points must be user specific. Once such an environment is created, the user's mouse click …

0
89
Member Avatar for vijaybrar

Hi i am kind of new to java but can please show me the code on how to count words in an input for example : [B] only allowed to use looping and String Methods only[/B] Select The type of character to be Stripped(1-vowel, 2-consonant, 3-number, 4-other(special characters) Input Enter …

Member Avatar for peter_budo
0
163
Member Avatar for ajayb

I am trying to learn java. I want to know whats the best way of doing it? For example I got the code for setting up a TCP server in java which sends the data given in string. Now I want it to send the data dynamically to the client …

Member Avatar for peter_budo
0
183
Member Avatar for Barnifericus

Okay so I have some questions about LinkedList. I'm doing an assignment on LinkedList and I noticed in the java API that there is a get(int index) method built in for LinkedList. From what I was reading LinkedList is set up like this node1->node2->node3-> where each node has reference to …

Member Avatar for JamesCherrill
0
111
Member Avatar for KenyanRaphael

I've been teaching myself java using youtube videos of Starnford Engineering Everywhere. So far its been good, till the code started getting complicated and i got stuck. I need advice on how best to learn java.

Member Avatar for KenyanRaphael
0
219
Member Avatar for primeratoma

I need help writing this code i been working for a day now on it and i cant seem to get it. i need help with this code if any one can help. I am taking java and this is the first program i cant get. thank you guys so …

Member Avatar for peter_budo
0
171
Member Avatar for banh

I am trying to come up with the algorithm for my n queens using Simulated Annealing. There is the general algorithm online, but when i look at it, I couldn't understand how it work. My nodes have the number of hits between the queens on chess board. How can I …

Member Avatar for banh
0
192
Member Avatar for an2kenz_143

ahmmm i have a few problem in my java game... my game is a quiz game..can u help me? .. or track it? heres my code... [CODE] package Games; import javax.swing.*; import java.awt.*; import java.awt.event.*; public class QandASample extends JWindow implements ActionListener { JWindow window = new JWindow(); JFrame que1 …

0
57
Member Avatar for VernonDozier

I just learned about the AtomicInteger a few days ago. Didn't realize it existed before. I haven't tried it yet. I used to simply write my own MutableInteger class. Integer has no "set" method. AtomicInteger does, so I imagine that it can now replace my MutableInteger class. My question is …

Member Avatar for VernonDozier
0
1K
Member Avatar for Neversleepin

Hi, i have a text file containing data like temperatures, voltage... this file contains more than 2000 rows What i want is to import this text file with Excel using Java. because i don't to open excel then click on import then choose the file...etc If someone know a tutorial …

Member Avatar for mKorbel
0
75
Member Avatar for mkab

Hello everyone. I need some help on a java project. I'm to develop a human genetic(family) tree. This is the subject: Each human cell contains 23 pairs of chromosomes numbered from 1 to 22,and a pair of sex chromosomes: XX in females and XY in man. During fertilization, the 22 …

0
107
Member Avatar for ChieftanBill

I am currently building a program where the user inputs up to 1000 numbers (-1000 to indicate the end of input), and a number of equations are to be applied. However I have encountered a problem with the "for loop" in case 1. The variables initialized and modified within the …

Member Avatar for ChieftanBill
0
141
Member Avatar for srinivas88

Using SAX parsing method is there any way by which we can get all the children of a particular node. For example, if i am having a xml like this <a> <b> <c></c> </b> </a> Using DOM parsing i can get all the child elements of <a> with getChildNodes(). But …

0
123
Member Avatar for ChieftanBill

This programming project/assignment had me write a program that lets the user play rock paper scissors with a computer until the user decides to quit, at which point their score(wins, loses, ties) will be displayed. The program I have so far works, aside from the "loop until the user decides …

Member Avatar for ChieftanBill
0
87
Member Avatar for Limiter

Hi everyone, just started learning Java and I realized a very minor problem. I am looking to multiply an asterix "*" by a number so that it is longer. Something like: Code: [CODE] String num = ""; num = "*" * 4; System.out.println (num); [/CODE] Sould output: **** But instead …

Member Avatar for stultuske
0
240
Member Avatar for carlitosway17

Hi I am supposed to create a program that prints out a rectangle made of asterisks using Turtle Graphics in Java I have attached a document describing the project. My code works fine and prints fine but the problem is I cant seem to get the right sequence to print …

0
398
Member Avatar for ishaangt

i am working on an encoder nad i have developed a way to encode my message in terms of (x,y) coordinates..but i have to put these locations on a world map to strengthen my encoder.... im using dev c++ 4.9.9.2 and need a gui base coding for my c++ program …

Member Avatar for ishaangt
0
166
Member Avatar for techie929

Hi, I have a doubt regarding a function myfunc(int i,int j) function. The return value of this function is a vector of type int[ ] .For Example if we pass myfunc(4, 2) it will return a vector {( 1,0) ,( 0,1) ,( 1,0) ,( 1,0) , ( 0,1 ), ( …

Member Avatar for techie929
0
116
Member Avatar for kukuruku

Hi,I am new in Java ,and I was wondering if somebody can explain what is the right way to create new object.Is the only right way the case 3,Am I only overwriting the arguments in the same object in case 1 and 2 Thanks [CODE] public static void main(String[] args) …

Member Avatar for ~s.o.s~
0
198
Member Avatar for kvass

Hi all! In a course I am T.A.ing, one of the students submitted this program as their assignment and I did not fully understand why it wasn't working: [CODE=Java] public class Alphabet { public static void main (String[] args) { char alphabet= 'A'; System.out.println("The following is the English alphabet."); while …

Member Avatar for JamesCherrill
0
206
Member Avatar for greenshell

I am doing a project where I have to make a Facile program that reads and executes statements line by line. Example would be like: LET A 5 ADD A 8 PRINT A END and that would print 13 to the console So I have a class for each of …

Member Avatar for ztini
0
126
Member Avatar for BioJavaPhobic

Below is part of some code I have written. I am trying to see whether nodes in a network are connected, and thus finding 'failurepoints'. I have a vector containing node Ids which I loop through to check for connections using a hasPath method. This all works fine, but my …

Member Avatar for BioJavaPhobic
0
633
Member Avatar for Katana24

Hello - I've used a for loop to fill an array of JButtons with text. Each JButton contains a letter of the alphabet. I've been successful in doing this and adding each button to a panel I created. But my problem is that I've tried, unsuccessfully, to add ActionListener's to …

Member Avatar for ztini
0
2K
Member Avatar for kukuruku

Hi,I have a question ,which one is a better way to set constructor [CODE]public Employee(String name,double hours,double perHour,Date dateOfHire){ id=++count; setName(name); setHours(hours); setPerHour(perHour); this.dateOfHire=new Date(); } [/CODE] or [CODE] public Employee(String name,double hours,double perHour,int day,int month,int year){ this(name, hours, perHour, new Date(day,month,year) ); [/CODE]

Member Avatar for Mitja Bonca
0
123
Member Avatar for carlitosway17

Hi am trying to create a random sentence generator for my Java Class the only issue is it builds successfully and rans fine but the output is not what is expected of the program. It should randomly generate 20 sentences. Here is my code [CODE]// Exercise 16.5 : Sentences.java // …

Member Avatar for carlitosway17
0
5K

The End.