35,618 Topics

Member Avatar for
Member Avatar for caswimmer2011

Hello, I am confused between the differences between a key logger and key listener in Java....i looked online but I couldn't find a straight-up answer. Thanks in advance!

Member Avatar for Vreality
0
445
Member Avatar for cecsFTL

I'm writing a program to ask the user for 6 points for a triangle and then calculate the length of the 3 sides, the perimeter, and the area. Then the tester will have to display the properties of the triangle, length of sides, the area, the perimeter, and if the …

Member Avatar for hiddepolen
0
1K
Member Avatar for Jessurider
Member Avatar for peter_budo
0
87
Member Avatar for squizzel

Hey Guys, I am new here but looking to come here often and obtain some leet skills in java. I am new to programming but do enjoy it. I was just assigned some homework that has me stumped. I would go talk to someone at my school but they are …

Member Avatar for Anyday
0
184
Member Avatar for Lendaanx

Im new to java and trying to get buttons to work. My next button works as intended however the first and last do not and the previous one only takes me back one space if i'm on the second item. I need the prev button to rotate backwards through the …

Member Avatar for hiddepolen
0
183
Member Avatar for xiangzhuang

Hey guys I keep getting the "no return statement error in two places, I have commented them for you [CODE] /** * A WordsCompare object stores Strings. It is used to determine if the first word * should be placed before or after the second word in the dictionary */ …

Member Avatar for JamesCherrill
0
292
Member Avatar for soham.m17

I want to add a Lable in a JComponent when a button will be clicked. I have added a actionlistner on that button. I've added this.add(label) in the JComponent. but the location, which is set by label.setLocation(...) is not maintained in the JComponent. If i use FlowLayout() in the JComponent …

Member Avatar for JamesCherrill
0
122
Member Avatar for rahulrulez

Hey there. I'm planning to develop a software for my father's business. The software is very simple, it has two tables. 1. Stock 2. Sale Whenever stock arrives, the quantity and content will be added to Stock table.. Structure is something like 1. Stock Table | Brand | Quantity | …

Member Avatar for peter_budo
0
211
Member Avatar for dandeliondream

Hi, I wish to display the homepage of 3 websites (e.g. [url]www.msn.com[/url], [url]www.google.com[/url], [url]www.apple.com[/url]) on screen. What should i use? Is there a tutorial somewhere?

Member Avatar for Anyday
0
138
Member Avatar for jklasd

I have a problem with getting an input from class A to class B. I already created a method which gets the value but when I call it in class b it returns empty. These are my codes: [B]CLASS A[/B] [CODE] public class log extends javax.swing.JFrame { public String name; …

Member Avatar for Anyday
0
3K
Member Avatar for gahhon

[CODE]import java.util.Scanner; public class Bakery { private static String flavors; private static String weight; private static int quantity; public Bakery(){ this("Chocolate Moist", "1(KG)", 1); } public Bakery(String flavors, String weight, int quantity) { this.flavors = flavors; this.weight = weight; this.quantity = quantity; } public void setFlavors(String flavors){ this.flavors = flavors; …

Member Avatar for gahhon
0
122
Member Avatar for gahhon

[CODE]import java.util.Scanner; public class Course { private String courseTitle; private double feesPerStudent; private int noOfStudents; private String[] studentName = new String[100]; private int courseCount; public Course(String courseTitle, double feesPerStudent) { this.courseTitle = courseTitle; this.feesPerStudent = feesPerStudent; } public void setCourseTitle(String courseTitle){ this.courseTitle = courseTitle; } public String getCourseTitle(){ return courseTitle; …

Member Avatar for gahhon
0
202
Member Avatar for djmonster

Hello All, Can everyone help me to solve this problem ? Im doing an assignment about downloading a file and write it to a new file. My problem is the file that I was trying to download is very large, so everytime I compile my Download class and the main …

Member Avatar for Anyday
0
198
Member Avatar for gahhon

is that any good ideas to fixed the aligment of the output instead of using \t, due to some of the output words have more or less. :)

Member Avatar for stevanity
0
86
Member Avatar for melkai

Hello, Working on my final project for a Java Class and have become stumped on the final leg of the code. We are supposed to create a program to add a record, remove a record, display a record, and list all records. The records must be written to a file. …

Member Avatar for stevanity
0
403
Member Avatar for vaironl

I had quiz today in my IB CS course, and I had a question I could not understand, I will try to stated as closed as possible. "There is an array of integers which holds an unknown amount of integers but it's not bigger than a 100. if a = …

Member Avatar for Akill10
0
193
Member Avatar for Dwillich87

Alright I think I'm getting closer but now my program skips by my System.in feature so the radius is never enter and just runs to completion any help would be greatly appreciated [CODE]import java.util.Scanner; public class Square { static class Circle { float radius; public double CircleInfo() { Scanner in; …

Member Avatar for Akill10
0
138
Member Avatar for moonL!ght

hi evry one ,im not used to java and i hate its bad compiler can any one tell me whay it give me this running time error:array index out of bound! this is the code were it have the erorr: [CODE] public class RotatingBieChart extends JApplet { int diamter,radius; int …

Member Avatar for hiddepolen
0
208
Member Avatar for pikalife
Member Avatar for Syrne

Hi again guys. I currently have a class named [B]ElementSet[/B] which houses an array of objects as well as an array of boolean values which pertain to two function tasked with flagging or unflagging an individual object. I also have an abstract class, [B]Element[/B], and two inheriting classes named [B]Subscriber[/B] …

Member Avatar for Syrne
0
229
Member Avatar for gahhon

[CODE]public class Fan { final int SLOW = 1; final int MEDIUM = 2; final int FAST = 3; private int speed; private boolean on; private double radius; private String color; public Fan(){ speed = SLOW; on = false; radius = 5; color = "Blue"; } public Fan(int speed, boolean …

Member Avatar for gahhon
0
228
Member Avatar for soham.m17

I want to add a selectable image to a PadDraw() of a JFrame container. So how can I do it? I've got a idea that it can be done by JLabel, but I think it's not selectable. So, how can I add that?

Member Avatar for soham.m17
0
103
Member Avatar for sha11e

The book I'm using says it should look something like this [CODE] import java.io.*; public class main { public static void main(String[] argv) { String fil = "CormeOn.bat"; FileWriter fw = null; try { fw = new FileWriter(fil); } catch(FileNotFoundException fnf) { System.out.println("Yea...."+fnf); } catch (IOException e) { e.printStackTrace(); } …

Member Avatar for JamesCherrill
0
127
Member Avatar for fausto1234

I am stuck in this code. I have to print results every 30 tosses for 500 total tosses. I made the 30 but in the loops. And also percentages are showing as 0 Help or hints would be much appreciated. [CODE]import java.util.Random;// program uses class Random public class CoinTossing { …

Member Avatar for fausto1234
0
159
Member Avatar for pavani2006

how can i check a given string to form a palindrome or not for(i=0;i<str.length();i++) { if(str.charAt(i)==str1.charAt(i) } }

Member Avatar for JamesCherrill
0
224
Member Avatar for Raghu_Ganapm

I would like to know when NullPointerException comes in java. any help would be appreciated.

Member Avatar for hfx642
0
97
Member Avatar for Forte1292

In high school I learned Pascal and C++. Everything from hello world to search trees, to graphical battleship with AI. Now I'm a freshman in college and in my CS1 class we are using Java, but after 2 months we are just now on arrays. Basically I was just hoping …

Member Avatar for hiddepolen
0
92
Member Avatar for danthevan

Hello, I have a weird problem while running my project. I use netbeans and here's my code and the problem is explained after the code. [CODE]/* * NetworkingView.java */ package networking; import org.jdesktop.application.Action; import org.jdesktop.application.ResourceMap; import org.jdesktop.application.SingleFrameApplication; import org.jdesktop.application.FrameView; import org.jdesktop.application.TaskMonitor; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.Timer; import javax.swing.Icon; import …

Member Avatar for danthevan
0
237
Member Avatar for ilovejava

lets say i have 8 deck of cards how to put all of that inside a array do i have to make a multidimensional array for each deck???

Member Avatar for JamesCherrill
0
273
Member Avatar for xanawa

Hi, I would like to know the code used for java to clear the screen as we do in c# using [COLOR="red"]Console.clear();[/COLOR] is it possible in Java aswell? If yes, what code should i use?

Member Avatar for Taywin
0
146

The End.