32,204 Topics
| |
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 … | |
....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 = … | |
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 … | |
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 … | |
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? | |
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 … | |
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 … | |
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 … | |
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 … | |
[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 … | |
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 … | |
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 - $" + … | |
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 … | |
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 … | |
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 … | |
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 … | |
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))) … | |
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 … | |
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 … | |
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) … | |
Hi Everybody, Kindly justify which compiler/IDE for Java is the best. i vote for JCreator! | |
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 … | |
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 … | |
Hello all, How to make Java Application to a Windows Service? thx~ | |
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 … | |
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 … | |
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? | |
anyone please tell me where i can get mp3 player for motorola v3i. Thnks | |
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 … | |
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 … |
The End.