32,199 Topics

Member Avatar for
Member Avatar for blazinhieu

How can i make the program to tell the user what letter of the alphabet it is: ex: " k is the 11th letter in the alphabet" here is the code that i got so far [CODE]import javax.swing.*; public class Ncom{ String Inputnum; char num; public static void main(String[] args){ …

Member Avatar for mckrm
0
120
Member Avatar for skyzer

My every figure has centre point with coordinates x, y tips number radius which shows tip range from centre point. i have a drawingRule method which is for every shape i need to draw. [CODE]package business_logic; import java.awt.Color; import java.awt.Graphics; import javax.swing.JPanel; @SuppressWarnings("serial") public class Vector extends JPanel { public …

0
69
Member Avatar for OrangeBox

Hi. I'm new here and need some help. I'm finishing school now and for the finish i need to "make"/program a game or smth. I decided to make a QUIZ in java. I know the basics of java i learned it about 1 year in school. So, i want some …

Member Avatar for jasimp
-1
128
Member Avatar for zyaday

Following me everywhere? why do I get those exceptions very much??? why are they raised?? My classes are always in the same package as the class they accesses them.. I know they are there. Why doesn't the compiler find them???? thanks for your help ppl...please help :@

Member Avatar for zyaday
0
92
Member Avatar for tones1986

Hey all - I have to create a basic client browser that creates a socket with a webpage and then uses a command similar to : GET index.html\r\nHTTP/1.1\r\nHost: [url]www.mysite.com\r\n\r\n[/url] To get the source code for the website. I will store each line recieved from the server into an arrayList, which …

Member Avatar for Ezzaral
0
100
Member Avatar for losh177

Hi, I'm having some problems with an infinite loop. For some reason, the process 112 is not being send anywhere. What i'm suppose to to do is to mimic a CPU. Each line represents a process which the first number is the machine time that it suppose to be send …

0
111
Member Avatar for handrews3583

I'm working on a program in which I am using the BorderLayout Manager. However, I'm having a difficult time changing the size of the window. I want to make it longer and more narrow, with only one or two text fields per row and want to make the text field …

Member Avatar for Ezzaral
0
137
Member Avatar for rast1940

Hello, I need to read in objects from a binary file and place those objects into an ArrayList. Not sure on how to go about adding the objects - this is what I have so far: [CODE]ArrayList<MailingLabel> arrayOfMailingLabels = new ArrayList<MailingLabel>(); try { ObjectInputStream in = new ObjectInputStream(new FileInputStream("labels.dat")); while …

Member Avatar for jwenting
0
102
Member Avatar for miguelms19

Just need a few pointers with the code below. I have the below class to complete but I am stuck on the isAllValidDigits() method where i have to create a loop to check and return true if all the int values of the authorId array and the programId array are …

Member Avatar for vchandra
0
89
Member Avatar for skyzer

im creating little program which produces cars, tractors and mopeds. car has 4 wheels and 4 cilinder engine, tractor has same, and moped has 2 wheels and 1 cilinder engine. this is what i have at the moment. next thing i need to do that with 2 factories.. home factory …

Member Avatar for skyzer
0
164
Member Avatar for whimsical1987

Hi, I have to do a project on Sudoku. I am finished generating the complete board. Now my major task is to generate a puzzle out of the complete board with the difficulty level. Can some one give me clue to remove the elements randomly from the board. Later on …

Member Avatar for whimsical1987
0
125
Member Avatar for JimD C++ Newb

Hi, I have a rather large binary file that I am attempting to read in, but I only want to read in the first 100 characters or so. I've tried searching the internet for help or an example, but I've only found examples that read in the entire file...and this …

Member Avatar for balmark
0
107
Member Avatar for jaque322

hi iam programming bisection method in java but i dont know how to evaluate functions if someone can tell me a class to do it function y=3sinx +cosX example f(a)f(b)<0

Member Avatar for harsh2327
0
57
Member Avatar for moone009

Im running windows XP Professional I have all of the latest updates on my laptop and I just downloaded the latest version of SQL Developer but when I try to open the program I receive this error “Unable to create an instance of the java virtual machine.” Ive been looking …

Member Avatar for debasisdas
0
77
Member Avatar for Ajantis

Hey folks :) I was writing some code today, and I wrote a function for computing factorials without use of recursion. What do you think about this one? [CODE]int factorial(N) { int r; r = 0; while (N > 0) { r *= (n-1); n--; } return r; }[/CODE]

Member Avatar for jwenting
0
260
Member Avatar for sinister747

Hi All, I am pretty new to Java and i am having difficulty using overloading on the [I]equals[/I] and [I]compareTo[/I] methods. I have a sample application for a school and i need to check for duplicates in records using the equals and compareTo methods. All records have Firstname, Lastname and …

Member Avatar for sinister747
0
104
Member Avatar for isaac4luck

Hi, I am quite new to Comp Sci and I just wrote a program in BlueJ that calculates the value of truth tables and validity in arguments. I followed the book's instructions and have a method with the signature: (It's in the class "Main") public static void main(String[] args) { …

Member Avatar for jwenting
0
164
Member Avatar for neti1987

Hi! I try to create HashSet of the next object: [CODE] import java.nio.file.Path; public class WatchedPath { public Path dir; public boolean recursive; public Filter filter; // Ctor with only Path - for comparing between the object (comparing is only by the path!) public WatchedPath(Path dir) { this.dir = dir; …

Member Avatar for neti1987
0
2K
Member Avatar for saggykulji

1. Create a doubly linked circular list in Java. Each element in the list contains a data which is an object of a Student class and two links, next and previous. 2. The Student class contains two class fields only: • name - The first and last names are in …

Member Avatar for peter_budo
-2
125
Member Avatar for saggykulji

suppose i created a dequeue class, with methods like insertFront() insertRear() removeFront() removeRear() peekFront() peekRear() isEmpty() isFull() how can i wrap it around and array ?? Will it work the same way as circular does?

0
62
Member Avatar for Alianncox

Hi, I get this error: `Exception in thread "Thread-4" java.lang.NullPointerException` When I try to send the vector to my form. Does someone knows where I made a mistake? Here is a part of my code: (this part is from my clientapplication (where I make a connection with the server) if …

Member Avatar for Alianncox
0
75
Member Avatar for mitsuevo

Hi i'm implementing a small java program where we have the game running in an applet. After each turn I want the applet to reset to the original setting for the next turn. Basically the game is a football being kicked into the goal. After the goal is made/missed the …

0
53
Member Avatar for acdougla17

I am trying to basically use the methods as functions and then call them in main but I cant figure it out. I thought it could be done like this but maybe I am just confusing my php&mysql class with Java. At the bottom of my code, there is a …

Member Avatar for stephen84s
0
165
Member Avatar for johndoe444

[CODE]// this is overkill Date now = new Date(System.currentTimeMillis()); [/CODE] Why is this overkill?

Member Avatar for jwenting
0
140
Member Avatar for harshareddy75

Hi all, I have a web app and in the web.xml file there is a filter which is applied to all the jsp files. However I need to change the particular filter so that it is not applied to 1 jsp file. I tried searching in regular patterns if there …

0
30
Member Avatar for Colin454

Hello, apon summing the rows of a two-dimensional array how can you put the results into a new 2D array so that the results can be sorted from largest to smallest or vice versa? we started with a 7 column 8 row array and now want a two column 8 …

Member Avatar for vchandra
0
83
Member Avatar for k2k

I had done a program with JFrame a year ago and I am trying to convert it to with JApplet so I can put it on the web. So far so good and I am able to see the applet and seems every functions are still working... there is one …

Member Avatar for k2k
0
196
Member Avatar for chrisb76

I am having problems setting up drop down menue for a application I am trying to do for a class. Can someone please give me some pointers. Here is the class assignment. Write the program in Java (with a graphical user interface) and have it calculate and display the mortgage …

0
45
Member Avatar for mikeyboy02

Hi I'm new to java and working on a program where I want to show the number of rentals for one person in one box and the total rentals in another box. I am having trouble storing the variable or it is not recognizing that I want to keep adding …

Member Avatar for mikeyboy02
0
108
Member Avatar for pateldeep454

I am having error in the following code. What should I do to fix it? Also, how should I call it in main method to test the code? please HELP :( [CODE] package sortingelements; public class Main { public static void main(String[] args) { } public int indexOfMaxInRange (int[] myArray, …

Member Avatar for Danny_501
0
121

The End.