32,204 Topics
| |
first buid array with images's --90 images PImage pic[]; void setup() { size(900,900); pic = new PImage[90]; for(int i = 0; i < 90; i++) { pic[i] = loadImage("section_"+i+".jpg"); } frameRate(0.5); smooth(); } than prnt image on screen int i = 0; int counter = 0; int flag = 0; … | |
hi, so i coded a projectile motion java applet, not only with this but with many other programs i get problems which seem to me to be a memory issue. But the first time lets say I shoot hte projectile it will not show the screen until it has landed … | |
I have to do a program dealing with 2 bank accounts. I must have a balance and a number of transactions. It also has to deal with draining a customers account and transfering the amount into the account that called the method. I have the rest of the code written … | |
Basically part of my project was to take the rows of pixels from a picture and make each row display twice, and the same for the column, and then eventually do them both together. However, I am having trouble with my loop to duplicate the rows or column. What I … | |
Ok so this is my task: Description: Create a generic class called GenBinTree. GenBinTree will use nodes that store a value of the generic type to store its contents. This tree will not be a search tree (no ordering of nodes by value). What ges me its the the part … | |
Hey there, I've got a small problem. I'm writing an UDP client-server system, and I wanted to use streams with UDP. I found [UDPOutputStream](http://www.java2s.com/Code/Java/Network-Protocol/UDPOutputStream.htm) source and pasted it into my project. Now, when I try to initialize it, it freezes. This is how I try to initialize it: outStream = … | |
Hello I'm tring to creat a specific Look in my Java JUI but my code is giving me errors when I try and launch it. Here is my code please take a look and tell me where i'm going wrong. Its a simple login interface for my program: import java.awt.*; … | |
Hi! I'm trying to create a method for simultaneous dragging a group of JLabel components. First, I select the components to be dragged ([ICODE]getSelectedStatus() -> true[/ICODE]), and then I want to be able to drag the selected components. I have a working method for a single JLabel component, but there … | |
I am looking for your opinions on the best site or book in order to learn java. I am currently in school for C.S. learning C and would like to expand my knowledge. Thank you in advance. | |
Hi, I'm using IReports to generate reports to my netbeans project. The reports which dosen't contain a chart, runs in the run time(Netbeans) and execute well. but when i add a bar chart to the report it gives the following exception even though the bar chart report successfully compile and … | |
I am currently making a game and am working on the town code right now. I have booleans for the areas in and out of the town, but when I go to leave an area it resets me back at the beginning of the program. I have it set to … | |
hi whats the meaning of these signs? for example: [B]System.out.printf("[COLOR="Red"][U]%6s %6s %10s[/U][/COLOR]", "x1", "x2", "(y1, y2) \n");[/B] | |
I want to add another Page to my Applet when clicked Submit, and to be clear need to retrieve data from the server where data is logs. please let me know what shall i do. package com.stage.logs; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.applet.*; import javax.swing.*; import javax.swing.plaf.TextUI; public … | |
Let's say I have a method called 'test' which should return the arraylist called 'theList' containing X number of Integers. How would I do that? public static void test(){ SOME CODE ... return theList } What should 'void' and 'theList' be replaced with in that code to make it work? | |
Hi there i am trying to write a java code that will essentially be like a gps but a lot simplier and i need to make a mini map about 4 by 3. where Dunada and Government is the first intersection and i have already done so by using multiple … | |
I can not figure out why my code won't work. public static void GenerateRandomTriangles(int numTriangles) to create a file RandomTriangles.dat having the following format (including some comments like the ones shown below) with random integer coordinates (x, y) of the three vertices of a triangle. Each x and y will … | |
as i m working on implementation of rsa algorithm,and during maiking console of it i found an error int cannot be dereferenced and i m unable to solve it because of working on java first tym...help me here is my code import java.lang.*; import java.math.*; import java.util.*; class rsa { … | |
Please help me...How to connect a jfilechooser and a jtree that takes the file system view of my pc..i need whenever a node is selected in jtree it automatically set as a current directory in the jfilechooser.. | |
I create a UnorderedLinkedList to split my sublist public class UnorderedLinkedList<E extends Comparable<? super E>> extends LinkedList<E> { public void splitMid(LinkedList<E> subList) { Node<T> current;//the head pointer Node<T> mid;//the mid point //Node first = firstNode; //Node last = firstNode; //Node subListFirst; //Node subListLast; int i; if(head == null) { subList.head … | |
I want to create a windows appliation in java using Swing in Netbeans. I want to create the student maintenance details, with Mysql as backend. I dont know how to load the frames in single form. Example, if the user give user name and password in the text box and … | |
Hi sir, I am student and I like to know about the algorithm for developing a MLM software for my final submision So, kindly tell me which algorithm works for the MLM software developement...need urgently please help.... | |
hi i need help is there anyone here have the knowledge of java to retrieved files in the folder and print it out im using this script File folder = new File("your/path"); File[] listOfFiles = folder.listFiles(); for (int i = 0; i < listOfFiles.length; i++) { if (listOfFiles[i].isFile()) { System.out.println("File … | |
I took a different view with Delete States. I decided to implement it like the InsertAfter method by using a Boolean, but I am pretty sure I am doing it right, but it only displays one state after I implement it. My Code for the Delete /** * * @param … | |
import java.util.*; public class ArrayListTesting { public static void main(String []args) { LinkedList<String> list = new LinkedList<String>(); list.add("apple"); list.add("pear"); list.add("tree"); Iterator <String> iterate = list.iterator(); System.out.println(iterate.next()); System.out.println(iterate.previous()); System.out.println(iterate.next()); System.out.println(iterate.hasNext()); } } it keep telling me it an error. | |
Hello my question is fairly simple though I can't seem to find the solution. I'm writing a program that basically calculates the area of different shapes. I am making a seperate method per shape to do the calculations but in my main method I need to call the method according … | |
Here is my Code...Im just confused on how to make a Driver class for this. Any help would be great! I know there shouldnt be a Main but it was the only way i could test my drawing on eclipse since i dont really get how to use a driver. … | |
Hi, I had an assignment where we had to fox a program and get it working correctly. I fixed 99% of the problems and the program runs correct. The only thing that is wrong is my insertionSort() method. It runs correctly, but in the wrong order. Currently its listing names … | |
I have to insert State objects into the link list, but the linklist is sorted I placed my notes in my code. Any help would be appreciated. public void insertAddStack() { int probe=0, index=0; States key=null; for (; index < addStackItems; index++) //loops through keys { for (; probe < … | |
This code is a java code. Can you please help me convert this to c#? private static URL URLObj; private static URLConnection connect; static String source = ""; public static void main(String[] args) { try { URLObj = new URL("http://students.usls.edu.ph"); connect = URLObj.openConnection(); connect.setDoOutput(true); } catch (MalformedURLException ex) { System.out.println("The … | |
Ask an user to type in a password, a qualified password should follow the constraints, such as: Length of password >= 8 Include at least one uppercase character Include at least one lowercase character Include at least one integer Include at least special character Write a program to check if … |
The End.