32,205 Topics
| |
public static void main(String[] args) { World earth = new World(); Turtle t1 = new Turtle(earth); t1.penUp(); t1.moveTo(50,50); t1.penDown(); t1.setPenWidth(5); t1.drawLetterN(5.0); t1.penUp(); t1.moveTo(500,400); t1.penDown(); t1.setPenWidth(3); t1.drawLetterN(2.0); t1.penUp(); t1.moveTo(330,50); t1.penDown(); t1.setPenWidth(15); t1.drawLetterN(15.0); t1.penUp(); t1.moveTo(250,240); t1.penDown(); t1.setPenWidth(8); t1.drawLetterN(7.0); t1.penUp(); t1.moveTo(10,350); t1.penDown(); t1.setPenWidth(10); t1.drawLetterN(10.0); } public void drawLetterN (double scale) { System.out.println("drawLetterN was … | |
:C my fresh install Netbeans 7.0 won't open and it says "JVM creation failed" can anyone pls tell me what's wrong? >.< | |
Basically, i've been told to initialise a grid into the "canvas" section of this program i've made, I need to make a fine grid that stretches across the whole canvas horizontally and vertically, 10 x 10 pixels apart example of the code i'm editing to do this below... [CODE] class … | |
Hello, The following program displays the text area for the entire JFrame even though I have set the dimensions of the text area to be 10 x 15. Any help will be greatly appreciated. Thank you! [CODE]import javax.swing.*; import java.awt.*; public class Scrollers extends JFrame { JTextArea area; JButton button; … | |
hi guys, i am doing a game where i have to detect whether my sprite collides with the wall horizontally or vertically, so in that case reverse the velocity of x or the velocity in y or both in some cases. what i have done is that with an array … | |
hello ! i have experience in VB.net,C# and MSSQL2000,2005,2008r2 .but today my boss assign me a task to connect mssql server 2008 by using JS or JSON ,both are unknown for me ,:( i dont have any knowledge about JSON and JS , can any one help me how to … | |
Do you have to be like a master programmer in a certain language to land a job in this field? | |
| Hi, I currently have a legacy application wrote in java and am trying to develop a new updated version of the application. The application relies on inputs from encrypted text files, the only thing is i dont know the type of encryption used in the old application. Is there any … |
Hi, So im trying to create a deposit method, but to no success. Can someone pls help me ?? This is my code for far: [CODE]static void depositCurrent (ArrayList<Current> CurrentListIn) { System.out.println ("Enter account number you want to deposit money into"); String accountNumber = EasyScanner.nextString(); boolean flag = false; double … | |
Hi, I was wondering, is their any way to draw/add a JFrame inside a JApplet. I have this JFrame that needs to be in Applet form, and I don't know how to go about doing it. Completely re-writing it is out of the question (5 or so classes). I didn't … | |
| My problem here is that I am trying to get the getBigJackpot() to correctly woork. If I were to win say 10 coins, it would store in an int, but if I were to win 5 coins, that 10 would stay and disregard the 5 coins won. If I were … |
Our class assignment is to add, subtract, multiply, and divide two huge ints i'm currently working on my multiply function and my multiply isn't working and i cannot pin point the problem. When i input 3*3 it inputs 9 but when you input 4*4 it outputs 6 (the carryover function … | |
Hello, i want to send images over socket .I had two methods one for converting the images to byteArray "convertImageToByteArray()" and another for converting byteArray to image "convertByteArrayToImage(byte[ ] b)" and i am trying to send bytes through socket and receving it , how can i do so please help..... | |
i am trying to use a picture for the background of my blackberry app instead of the default white background how can i do this? any code snippets would be greatly appreciated Thanks | |
Hi i am a new developer i am just trying to create a simple app and put it on my phone. i have created a hello world one and successfully put that on my phone, i am now trying to create one where you click on a button and it … | |
I have to make a program that outputs something similar to the appearance of a phone. With intractable buttons, (0 - 9) a T button that outputs "Calling" and an E button that outputs "End-Call" Now i have that much done [CODE]import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Dimension; import java.awt.Color; import … | |
Develop a program to keep track on the library books inventory system for the library administrator. Your program should allow the admin to add and edit books’ details such is ISBN, title, author, publisher, date of publication, etc. The admin staff can create accounts for library user to perform functions … | |
I know that .bat isnt java, but I dont know were else to place this thread So ive finished my program, has sounds, images and other junk all in a folder on my desktop. as soon as you open the folder you can see the file program.java and also folders … | |
i want to know about performance measurement tool in java means tools which measure the time statistics ,memory statistics etc of a program which coded in java? | |
[CODE]import java.io.*; import java.util.*; import java.lang.*; class Login extends Thread { public void run() { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); Scanner s=new Scanner(System.in); while(true) { System.out.println("Enter username:"); String h=br.readLine(); System.out.println("Enter password:"); String d=s.nextLine(); } } } class Display extends Thread { public void run() { while(true) { System.out.println("ur username is:"+" "+h); … | |
Hello all: Has anyone tried one jar and received an error that the main class will not Load? I used "ONE JAR" and created the executable and I altered the build file. response from simon: Main-Class: com\simontuffs\onejar.Boot One-Jar-Main-Class: musicSystems.src.view.Main [quote] "Main-Class" is the "standard" Java JAR main class launcher, used … | |
this is the code that i did: [CODE]import javax.swing.JOptionPane; public class MidtermExam { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub int x; int y; int z; int count = Integer.parseInt(JOptionPane.showInputDialog(null,"Enter any Number:")); for(x=1;x<=count;x++){ for(y=x;y<=count;y++){ System.out.print(x+""); } System.out.println(); } } } [/CODE] … | |
hello i trying to learn how to type in for exampel 5 and its going to type out 5 4 3 2 1 0 [CODE]import java.util.Scanner; class indexerad_variable { public static void main( String args[] ) { int i= 0; while (i<= 100){ System.out.println("your number: "); System.out.println((100-i)); i++; } } … | |
Hello, I have a problem with the logout functionality on my web application . it is a simple application that uses DatabaseServerLoginModule to login and uses invalidate() in the application and [code=xml]flushOnSessionInvalidation="true"[/code] in jboss-web.xml. also each page in the jsp has [code=JSP]<%@ page session="false"%>[/code] on the very top and the … | |
My assignment is to create a program that accepts a list of exam scores (ranges from 0-100) and output the total number of grades and then the number of each in letter grade.. but my problem in the beginning of doing my program is: [CODE]public class Grades { /** * … | |
Please help!!! What would be the algorithm form of the following program:- [code]import java.util.*; public class quizcontest { Scanner sc=new Scanner(System.in); String name; int ans1,ans2,ans3,ans4,ans5; //declaring variable// void acceptname() {System.out.println("****************************"); System.out.println("|||||-----Please Enter Your Name-----|||||"); name=sc.next(); System.out.println("****************************"); System.out.println("+++++Best Of Luck ! "+name+" +++++"); } void sports() { System.out.println("Here Starts Our Quiz … | |
hiya i need to create these if statements please can someone show me how to create them i have attached an image alongside this thank you so far i have this public class Logic2 { int Val1, Val2, Val3, Result1, Result2; // creating 1,2,3 integers public void Calculations (int Val1,int … | |
How do we write something to square these calculations Result1 = Val3-Val1sqaured; Result2 = Val3-Val2; i need to square these calculation how would i do it so it meant to look like Result1= Val3-Val1sqaured; i cant get the squared bit thank you | |
Okay, so I think it will be easier to show you then explain. I am making Minesweeper, I have 100 toggle buttons, I have a randomizer to place 10 bombs. [CODE] ArrayList<Integer> bomb = new ArrayList<Integer>(); Random rand = new Random(100); for (int i = 0; i < 10; i++) … | |
| I need to know how to create methods to compare two sets of singly linked lists. The only problem is that I can't put a linkedlist inside the method parameters. Please help [CODE]import java.util.*; public class SLinkedList { protected Node head; // head node of the list protected Node tail; … |
The End.