32,199 Topics

Member Avatar for
Member Avatar for MistaGeorge

So what I'm trying to do is pass the values of one class to the other. So with the code i have i believe what is happening is im not passing the values. But im passing the referenced location. import java.util.Arrays; public class numbers { int[][] x = {{6,10,14,31,32},{12,23,12,11,22}}; public …

Member Avatar for MistaGeorge
0
424
Member Avatar for anestistsoukalis

My main idea is to find an algorithm ( Java ) that takes the random letters which someone has typed in a JoptionPane for instance and then instantly by pressing "Find words" i would like the program to derive all those words that match my letters from a dictionary stored …

Member Avatar for iamthwee
0
219
Member Avatar for Wilfred_2

A blue passenger train moves southwards at a speed of 120km/hr. Unfortunately as it enters a junction it collides with a brown goods train moving northwards. The collision happened 50 minutes after the goods train takes off. Using a Java program illustrate the answer.

Member Avatar for JamesCherrill
0
122
Member Avatar for Mohamed_30
Member Avatar for JamesCherrill
0
232
Member Avatar for johnef_sh

I am working on a Google Map api3, I am adding points on the map and save it to my database this part is working fine now in the end of adding the map and click on save and close I need to redirect to another page which will tell …

Member Avatar for johnef_sh
0
249
Member Avatar for LyingInAHammock

Out of my depth a little :-) How do I create a pair of longitude and latitudes to create a polygon showing a 2 mile radius of a particular longitude and latitude? in Java Android. I know how to find your current longitude and latitude but I just can't figure …

Member Avatar for jwenting
0
557
Member Avatar for jackjuma12

Hi guys I need some help pls. Can somebody help me a jsp login code. The code should select username,password and userlevel fields from a database(say employee). If both username and password are correct, it should check the userlevel. If the user level is "admin", should load the admin home …

Member Avatar for JamesCherrill
0
114
Member Avatar for Ndey yassin
Member Avatar for isslam.akkilah.5

1 00:00:01,600 --> 00:00:04,080 54545<b>Mr Magnussen, please statss434e your full name for the record.</b>65565 i tried this it work if the number are there but if there is no number it set the beginning 0 so i need the fourm to read a number between string if it was at …

0
64
Member Avatar for isslam.akkilah.5

am trying to read file in java but i have an issue bufferReader are stating from number 2 `public static String lineLengths() { try { String file = "C:\\\\Users\\\\isslam\\\\Documents\\\\NetBeansProjects\\\\AnimeAid\\\\tra.srt"; BufferedReader br = null; try { br = new BufferedReader(new FileReader(file)); } catch (FileNotFoundException e) { System.out.println(e); } String line; while((line …

Member Avatar for isslam.akkilah.5
0
143
Member Avatar for Doogledude123

So I have a button which adds a "Miner" then removes the cost of the Miner. The problem is that it is taking away too much, double the cost, and also will not buy if the current gold is equal to the cost. I have no idea why it is …

Member Avatar for sepp2k
0
304
Member Avatar for mohan@nano
Member Avatar for theGrinch

I'm trying to use html onclick in java servlets like this; ShoppingCart cart = new ShoppingCart(); out.println(" <h1><button type=\"button\" onclick=\"cart.addBook(b.getIsbn())\">add</button> </h1>"); addBook is a method in ShoppingCart class, and I'm calling it when the button is clicked, but it's not getting called. Please help.

Member Avatar for Tu Dinh
0
4K
Member Avatar for Amudha.M

Blob b=rs.getBlob(12); bytes[] imagebytes=new bytes[(int)b.length()]; Image image; image=getToolkit().createImage(imagebytes); ImageIcon icon =new ImageIcon(image); jLabel22.setIcon(icon); This will not work. help me to display the image

Member Avatar for JamesCherrill
0
232
Member Avatar for stud101

Hi, am so new to java programming and I need help to create an address book. Am using this project to test my self.(http://sis.ashesi.edu.gh/courseware/cms/mod/resource/view.php?id=218). Please this is my writen code but I need help to add, edit, delete, and the rest of the functions. Or better if someone can guide …

Member Avatar for JamesCherrill
0
312
Member Avatar for Doogledude123

Could someone give me a few reasons why an Application isn't terminating on close? `*THIS IS FOR A JavaFX APPLICATION*`

Member Avatar for JamesCherrill
0
1K
Member Avatar for shivers20

I am having some difficulty, any advice would be gladly appreciated. Thanks in advance. [B]Write a program that reads the following information and prints a payroll statement:[/B] [B]Employee's name[/B] [B]Number of hours worked in a week[/B] [B]Hourly pay rate[/B] [B]Federal tax withholding rate[/B] [B]State tax withholding rate[/B] [B]Enter employee's name: …

Member Avatar for stultuske
0
3K
Member Avatar for mo1994

I am working on Image Viewer How do I work on the Action button to display images one after the other with Next and Previous

Member Avatar for stultuske
0
112
Member Avatar for kiroyzki

This is how i try to run my JDK via cmd but i always get en error: ______________________________________________________ Microsoft Windows XP [Version 5.1.2600] © Copyright 1985-2001 Microsoft Corp. C:\Documents and Settings\Elliona>cd desktop C:\Documents and Settings\Elliona\Desktop>cd kirby C:\Documents and Settings\Elliona\Desktop\kirby>path C:\java\bin C:\Documents and Settings\Elliona\Desktop\kirby>javac payroll.java C:\Documents and Settings\Elliona\Desktop\kirby>java payroll.java Exception in …

Member Avatar for stultuske
0
619
Member Avatar for Doogledude123

This is PART of my GoldMiner class where the problem is occuring. I am getting a null pointer. I assume it is because of the way I declared my sceneController class. private static Game game; private static sceneController controller; public static void main(String[] args) { Application.launch(GoldMiner.class, (java.lang.String[])null); game = new …

Member Avatar for Doogledude123
0
7K
Member Avatar for anisha.silva

Hi, i am new to groovy language. I was wondering if there will be anyone who will be able to help me understand the below code. static analyzeAPI(pkgname) { def refs = Yaml.load(new File(output_base + "/${pkgname}_PackageRefs.yml").text) refs.Classes.each { analyzeClassRef(pkgname, it.name) } } static analyzeClassRef(pkgname, name) { println "=== Analyze class …

Member Avatar for anisha.silva
0
217
Member Avatar for Pyler

Node inside a linkedlist SomeInterface has an addLast() method that should add a node at the end of the list public LinkedList<T> implements SomeInterface<T>{protected class Node<T>{ privateT data; private Node<T> head,tail; protected Node(T data,Node<T>tail){ this.data=data;head=null;this.tail=tail;} private T getInfo(){return this.data;} private void setTail(Node<T>newTail){this.tail=newTail;} private void setLink(Node<T>newHead){this.head=newHead;} private Node<T> getLink(){return tail;} }} …

Member Avatar for Pyler
0
198
Member Avatar for custurd122000

I need a code that reads in a text file into an object Computers and sorts the specific indexes in descending order, as you can see the first one vendors is already sorted so you just need to print that one. Then in my case 2 I need to print …

Member Avatar for cgeier
0
510
Member Avatar for anisha.silva

Hi, I have a parser in .madl language in a txt format and I want to implement the code completion in java in eclipse plugin project. Fro ex: code completion is in a java editor if you press Ctrl+space a popuo window appears with relating option that are available, I …

Member Avatar for anisha.silva
0
416
Member Avatar for anisha.silva

Hi, I am implement a plugin project in eclipse in java language. I have a parse which is in s simple txt file. Below is the txt for the parser. id=app1 [String] #type=app [String] mainView=top name=First App [String] children: size=1 === child[0] === class=View id=top [String] #type=View [String] #line=8 [Integer] …

0
152
Member Avatar for sk8ergirl

I have combo box and two type of employee in my db I want to display full time emplyee in the combo box however when I tested the code I this line is executed ` test = conn.prepareStatement("select * FROM Employee WHERE EmployeeType = " + "'" + "Part Time" …

Member Avatar for JamesCherrill
0
160
Member Avatar for jayturner

import java.util.*; public class Node { int costs[][]=new int [4][4]; int mincosts[]=new int [4]; int dest[]=null; ArrayList packets=new ArrayList(); Simulator sim=null; /** *@param args */ public RoutingPacket creatertpkt(int srcid, int destid,int mincosts[]) { RoutingPacket oRPacket =new RoutingPacket(); oRPacket.setSourceid(srcid); oRPacket.setDestid(destid); oRPacket.setMincost(mincosts); return oRPacket; } void rtinit(int srcid,int dest[], int initcosts[][],int initMinCosts[],Simulator …

Member Avatar for JamesCherrill
0
268
Member Avatar for Jjaus

Write a class that accepts a user's hourly rate of pay and the number of hours worked. Display the user's gross pay (gross pay = hours worked * hourly rate), the tax withheld (tax withheld = gross pay * tax rate) and the net pay (net pay = gross pay …

Member Avatar for Jjaus
0
141
Member Avatar for CoilFyzx

Hello I am using jxls quite fine. I'm sort of on my last lap with exporting my data to a file. However all I want to know is, how do I display my collection in the same row please? I've manage to do this downwards in the same column, but …

Member Avatar for CoilFyzx
0
288
Member Avatar for ezekel

Hi i need your help please I am still learning android...i don't know this error "at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1133)"... can you help me how to solve this. Thank you.

Member Avatar for peter_budo
0
902

The End.