32,204 Topics

Member Avatar for
Member Avatar for iamsmooth

I know Netbeans has its own profiler, but for this assignment I have to use Jrat. I tried adding a command line argument -javaagent:shiftone-jrat.jar like you would put in the console, but it didn't work lol. I think I have the paths set up, I'm just not sure how to …

0
86
Member Avatar for nope3d

....can any one knows how to sort my class union.... ...since when i run it the output is correct but i need to sort it to feel much better...... here is my program.... this is my MAIN..... [CODE]public class FinalProjectBitString { public static void main(String[] args) { MySet universalSet = …

Member Avatar for masijade
0
65
Member Avatar for bobomonkey

Hi, I am writing a functional test automation script to automate the file upload feature of a web application. I am using a tool called selenium to operate on the browser. This tool however does not support clicking on the file upload control hence I want to do this operation …

-1
64
Member Avatar for tonief

I have this code i java I have class [CODE] class Author { String name,surname; public Author(String name,String surname) { this.name=name; this.surname=surname; } public String getAName() { return name; } public String getASurname() { return surname; } } [/CODE] And This code is OK; I have a button in jFrame …

Member Avatar for tonief
0
82
Member Avatar for 00darbo

I am new to programming Java, and cannot seem to find a simple answer to this on the discussions on how to go about this. Anybody?

Member Avatar for Zaad
0
68
Member Avatar for timon_zed

Hello good people of the world, I seem to be having a problem with how to make comparisons of dates using the Gregorian calendar objects. i want to find out if there is a way in which i can achieve it.the idea is make comparisons between the current date with …

Member Avatar for javaAddict
0
139
Member Avatar for 00darbo

Oddly, I am getting a similar problem, but mine seems not quite so simple: import NsccLibrary.*; import java.awt.Color; /** * This is a class in which tic-tac-toe boards will appear. * * @author Darby McShain * @version 1.0 */ public class TicTacToeFoSho{ private NsccWindow wind; /** * This creates the …

Member Avatar for javaAddict
-1
93
Member Avatar for morgoe

Is there a way to make an 'if' statement that applies to the whole code? I'm doing a user-input text-based program. And I basically want the user to be able to type 'quit' at any time, and that'll end the program. But I don't really want to have [CODE] if …

Member Avatar for javaAddict
0
137
Member Avatar for EddieC

One way to become the "ultimate" of something is to simply declare it. JetBrains, maker of the IntelliJ IDEA Java IDE, on Thursday began previewing [url=http://www.jetbrains.net/confluence/display/IDEADEV/Maia+EAP]IntelliJ IDEA Ultimate Edition[/url], the latest version of its commercial integrated development environment for Linux, Mac OS X and Windows. The "ultimate" designation is presumably …

Member Avatar for peter_budo
1
746
Member Avatar for iamsmooth

[code] public int peek () { if (empty() == true) { throw new EmptyStackException(); } return StackContents[top]; } [/code] So I have this piece of code in a class that implements a stack. The program works perfectly. However, when I use Junit to test it, I have this: [code] @Test …

Member Avatar for iamsmooth
0
121
Member Avatar for lllllIllIlllI

Hi, I have been trying to get a java program that draws a line directly on the screen. I have made ones that draw on JApplets and JFrame's but i cant work out how i can draw directly on the screen without having something in the way. I looked at …

Member Avatar for lllllIllIlllI
0
106
Member Avatar for hello214

hi, I'm trying to do my decimal to the nearest hundreths, i've tried using number format and printf but i couldn't do it. Anybody can help me with this: here is my program float grossPay = (calcGross(nHrsWrkd, hrlyRate)); float netPay = (calcTaxes (calcGross (nHrsWrkd, hrlyRate))); System.out.print("\nTaxes Withheld - $" + …

Member Avatar for javaAddict
0
166
Member Avatar for ice_cool

Hello, I have to cycle an image colors (specifically RGB) and i would like to know if Im on the right track here. Im also using 2-dimensional arrays. [ICODE] public void cycleColors() { Color red[][] = new Color[height][width]; Color blue[][] = new Color[height][width]; Color green[][] = new Color[height][width]; for (int …

0
62
Member Avatar for Superfat

Ok, i have been working on a simplistic game for about an hour now. This is what i have so far: [CODE]import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Game extends JApplet { private int APPLET_WIDTH = 500, APPLET_HEIGHT= 100; private int money; private int owned; private JLabel labelMoney; private …

Member Avatar for VernonDozier
0
12K
Member Avatar for ibhome

I am writing integers from 1-100 into a file separated by commas. I need to know how to read in a "," into a file and print it out again. Below the code is sample output after execution of the code. The comma is not output correctly. I know it …

Member Avatar for ibhome
0
191
Member Avatar for gibson.nathan

what i am trying to do is to read this data in from a file, [CODE]1980 Aug 945 100 Allen 1983 Aug 962 100 Alicia 1984 Sep 949 100 Diana 1985 Jul 1002 65 Bob 1985 Aug 987 80 Danny 1985 Sep 959 100 Elena 1985 Sep 942 90 Gloria …

Member Avatar for VernonDozier
0
132
Member Avatar for nicolek808

I am having trouble with stacks and infix and post fix this is my error: [COLOR="red"]Reading from file "input16.txt": Infix expression = (5) Exception in thread "main" java.util.EmptyStackException at ArrayStack.pop(ArrayStack.java:51) at test.infixToPostfix(test.java:140) at test.displayArray(test.java:87) at test.main(test.java:53)[/COLOR] this is the txt file: (5) (1+1) ((9/3)-2) (9-(3/2)) (1+(4-(9*(6/(5%7))))) ((1+4)-(((9*6)/5)%7)) (((1+(4-9))*6)/(5%7)) ((1+(2-3)) (1+(2-3))) …

Member Avatar for ejosiah
0
2K
Member Avatar for jooa

Hi, I am trying to convert an image into grey scale. I can do this using a buffered image however the image type I have is Image. As you can see in the code below I try to cast the Image to a BufferedImage, apply the greyscale then cast is …

Member Avatar for asimKhatri
0
366
Member Avatar for pwk064

Here is my Main method - calling Display. I am getting an error message, I don't know what I am missing. Any suggestions? public class Student { private int studentID; private double studentGPA; public Student() { studentID=100; studentGPA=3.0; } public Student(int id, double gpa) { studentID=id; studentGPA=gpa; } public void …

Member Avatar for masijade
-1
2K
Member Avatar for pwk064

Here is my Main method - calling Display. I am getting an error message, I don't know what I am missing. Any suggestions? (error message below the code) public class DisplayStudent { public static void main(String[] args) { Student IDNGPA = new Student(); IDNGPA.Display(); } } Error message: DisplayStudent.java:11: Display(int,double) …

Member Avatar for peter_budo
0
94
Member Avatar for warbird43

Hi Everybody, Kindly justify which compiler/IDE for Java is the best. i vote for JCreator!

Member Avatar for peter_budo
-2
216
Member Avatar for TigerGirl

Hi. I have a recursive public static method search that takes a Tree node (any arbitrary binary tree, not necessarily a search tree) and returns whether or not that tree satisfies the order property for a binary search tree. So, my method is [CODE]public static boolean search(TN t) { if …

Member Avatar for TigerGirl
0
201
Member Avatar for bentlogic

Hi Java Developers, wondering if someone can point out why references to 'Student' (successfully compiled java class) in my ValidRecords.java source file don't seem to resolve at compile time? It's important to say that ANY and ALL references to Student object from inside ValidRecords.java don't resolve... not just the one …

Member Avatar for peter_budo
0
345
Member Avatar for nihao
Member Avatar for icke2433

alright ive been banging my head against a wall for three hours and i give up does anyone have a clue? the what im supposed to do is write a method named lotsOfStars that will accept two integers: the first integer indicates the number of lines to print, the second …

Member Avatar for petrisal
0
102
Member Avatar for fareast87

Hello everyone. If we open the jpg file with notepad, we can see some text or gibberish that doesn't give us any meaning. How do I append some text (ie password hash) to it using Java? I'm attaching a password hash to the jpg file. Hope that anyone reading this …

Member Avatar for fareast87
0
91
Member Avatar for fareast87

Hi everyone. I'm going to read a content of a jpg file using java.io.FileReader. I'm successfully read the whole content of it. But the problem is, I want to only read the last 32 digit hexadecimal number which is MD5 hash I save earlier. How am i suppose to do?

Member Avatar for fareast87
0
98
Member Avatar for temsuimsong
Member Avatar for peter_budo
0
84
Member Avatar for azwraith69

Hello... This is my naval battle game so far.. Just search i t if you're unfamiliar with the game it is only player vs computer.. can you adjust/fix my code so that: -the player is able to place his ships by means of dragging the JLabel ships at the left …

0
765
Member Avatar for lllllIllIlllI

I am making a slider puzzle applet. And i have this problem when i display it as an applet my buttons do not seem to act the same was as they did before i made it into an applet by using a JApplet rather than a JFrame as my extension …

Member Avatar for lllllIllIlllI
0
117

The End.