32,199 Topics

Member Avatar for
Member Avatar for Lee_8

Can anyone help me to write java program? I'm using BlueJ for this assignment. This assignment is to write a program to calculate loan repayments. Banks and/or finance companies loan customers money (usually called a mortgage) so they can make large purchases (such as a house or a car). Each …

Member Avatar for JamesCherrill
0
808
Member Avatar for Desmond_1

import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import javax.swing.JFrame; import javax.swing.SwingUtilities; import javax.swing.Timer; @SuppressWarnings("serial") public class OnClickLesson extends JFrame { private int value = 0, clicked = 0, countdown = 1; private Timer timer = new Timer(1000, null); public OnClickLesson() { timer = new Timer(1000, new countDownTimer()); addMouseListener(new MouseAdapter() …

Member Avatar for Desmond_1
0
248
Member Avatar for Bradoz

Hello below is my code for a program that reads in integers rom keyboard input and creates two polynomials from that input and then does some maths functions on them. I've got the addition working, having trouble with the multiplication though. Any help would be appreciated. thanks import java.util.*; import …

Member Avatar for JamesCherrill
0
3K
Member Avatar for Slavi

Apparently JavaFX is getting really into the game now as far as I see and I think its time I start getting to know it .. Just read a couple of articles and a few questions came up in my mind: - Do I need to use IDE (eclipse) for …

Member Avatar for Doogledude123
0
286
Member Avatar for asaidi

Hi i just export my project on ubuntu and when i run from terminal i have this error java.lang.ClassNotFoundException: com.mysql.jdbc.Driver and in my project the mysql connector is located in the desktop.. any solution please

Member Avatar for Taywin
0
234
Member Avatar for SpottyBlue

I was practising the past year question just now. I wanted the program to show this: > Continent name: Australia > Number of Countries: 1 > Country name: Australia > Population: 22118256 But my code makes the program to show the first 2 lines. package jan2012q5b; import java.util.*; class Continent …

Member Avatar for JamesCherrill
0
161
Member Avatar for SpottyBlue

I was doing the code as part of my lab tutorial. When I tried running the code, it doesn't work. Line 68 has an error. Can help? package t10; import java.util.*; class Employee { private String name; private String title; public void setName(String n) { name = n; } public …

Member Avatar for JamesCherrill
0
150
Member Avatar for nancy10001
Member Avatar for ~s.o.s~
-1
383
Member Avatar for ParPau

I have been looking for a solution to isolate markings and have not found anything on the internet that is close to for what I am looking. I am trying to isolate the markings in a series of pictures. I have one, unmarked image. I then have a series of …

Member Avatar for Taywin
0
558
Member Avatar for salesforce

Hi, My name is Micky. I have requirement, but i don't know how to start it, could anyone help me out. here is the requirement. In a class there are 10 Students with name , marks , Percentage and there rank should be in the below format Name Marks Percentage …

Member Avatar for JamesCherrill
0
295
Member Avatar for astrid.deliz

Hey guys im completely new to programming and im complete stuck and any help to comlete my assingment would be greatly appreciated. heres my assingment. Your task for this assignment is to define multiple classes via inheritance. Your classes should implement various "snacks" including "M&Ms", "Popcorn", etc. To begin, create …

Member Avatar for JamesCherrill
0
1K
Member Avatar for jones13

After trying different things for about a week i have come to the conclusion i am lost. Can someone please show me how to do this. This assignment, based on Vending Machine we did in class, you are to now vend six different snacks. The Vending Machine has a capacity …

Member Avatar for JamesCherrill
0
402
Member Avatar for moaz.amin.37

import java.io.*; class WriteFile { public static void main(String ss[]) { try { FileWriter fw=new FileWriter("output.txt"); PrintWriter pw=new PrintWriter(fw); String s1="Hello World"; String s2="I Am Learning Java"; pw.println(s1); pw.println(s2); pw.flush(); pw.close(); fw.close(); } catch(IOException e) { System.out.println(e); } } } in upper code println() is called with object of `PrintWriter` …

Member Avatar for moaz.amin.37
0
195
Member Avatar for ife_1
Member Avatar for rubberman
0
109
Member Avatar for reuben_1

I have this big problem with my code, here it is: https://www.dropbox.com/s/2lc6iygbx2gwlqj/Screenshot%202014-07-19%2011.24.20.png here is my ERROR: Exception in thread "Thread-0" java.lang.IllegalArgumentException: input == null! at javax.imageio.ImageIO.read(ImageIO.java:1348) at ca.gingerninja.game.gfx.SpriteSheet.<init>(SpriteSheet.java:19) at ca.gingerninja.game.Game.Screen(Game.java:55) at ca.gingerninja.game.Game.run(Game.java:78) at java.lang.Thread.run(Thread.java:745) Can someone please help, I would really like to continue with my game!

Member Avatar for JamesCherrill
0
3K
Member Avatar for Doogledude123

I am honestly baffled that there is almost NO help for anyone using JavaFX. For those of you who know Java like the Face on a clock, I encourage you to take some time to learn Java FX. The beginners need people like you.

1
128
Member Avatar for hwoarang69

Hi, I am using Java, Libgdx, box2d I main class I have created a body and I set player x and y position to 50. // main class public class main{ ... private void createPlayer() { BodyDef bdef = new BodyDef(); Body body; FixtureDef fdef = new FixtureDef(); PolygonShape shape …

Member Avatar for Taywin
0
370
Member Avatar for Violet_82

hi all, I wanted to build a small and easy interface where I have some text and two buttons, one to increase the size of the text and one to decrease it. I haven't built anything as yet, I am still thinking what's the best way to go. In terms …

Member Avatar for Violet_82
0
369
Member Avatar for moaz.amin.37

Exception message is not showing import java.util.*; class WrongException extends Exception{ public WrongException(String s){ super(s); } } public class UserDefinedException2{ public static void main(String s[]){ int a,b; a=b=0; Scanner ob=new Scanner(System.in); System.out.print("Enter your age = "); a=ob.nextInt(); try { if(a<=0) throw new WrongException("age cannot be zero or nagetive"); System.out.print("age = …

Member Avatar for Akansha Jain
0
2K
Member Avatar for Doogledude123

I have a method that sets the width and height of the treeview to its parent's width and height, for some reason this isn't working. I had it working with a listview, but I decided a treeview would work best in my case. Ill supply the full FXML, and it's …

Member Avatar for Doogledude123
0
2K
Member Avatar for Doogledude123

How would you "lock" the position of a SplitPane Divider in JFX? I've tried google-ing around, and all I can find is ways to make it Transparent, which I believe would still make it movable... Any Ideas?

Member Avatar for Doogledude123
0
249
Member Avatar for Doogledude123

I cannot get the JFrame to display my JPanel. Either that, or my JPanel isn't displaying my JScrollPane. Here's my code: public class PokeBase extends JFrame { private static final long serialVersionUID = 1L; private static final int WIDTH = 1280; private static final int HEIGHT = 720; public static …

Member Avatar for Doogledude123
0
313
Member Avatar for adarshcu

Hi All, I need some help with analysing a problem. I have a list of objects that are retreived as part of search results in my webapp page. From the list of these objects, one object is selected and the next screen is populated with the data from this object. …

Member Avatar for JamesCherrill
0
150
Member Avatar for brittney_2

I want to know if I would be able to replace different words all in one regex expression. For example if I wanted to replace the name John with Joe and Smith with Doe. Would I be able to do that with one expression? Here is a code that I …

Member Avatar for ~s.o.s~
0
744
Member Avatar for Mike Askew

Quite rare to see me post in the Java forum but have been picking it up as part of a long-distance university course I am doing. I am currently trying to read in an ASCII coded .txt file and output it but am seeing some funny characters showing up. The …

Member Avatar for JamesCherrill
0
172
Member Avatar for IndieDeV2002

I have been developing a simple java game, however I would like to add some Music to my game because it seems quite boring whenever you play it.

Member Avatar for bCubed
0
912
Member Avatar for Slavi

Me as one of the users in Dani web and a person who has interest in Java, I've tried to solve if not all, most of the begginers problems. I've even tried to solve some myself afterwards however, now I ran out of ideas. I would also like to move …

Member Avatar for JamesCherrill
0
444
Member Avatar for 2384443

well guys, i wanted to try somethng fun in java, so i made a simple form type navigation program.. i can compile this file, bt i cant run it..NOTE: i have no issues in my java software.. import javax.swing.*; import java.awt.event.*; import java.awt.*; import java.util.regex.*; public class Nav2 extends JFrame …

Member Avatar for 2384443
0
242
Member Avatar for RAJboss

function generateHashLink($service_domain, $file_path, $url_signing_key ,$expiry_timestamp = NULL){ // + and / are some of represented chars of based64 encoding (8 bits) // + is 62 and / is 63 and these char should be replaced by other predefined chars $search_chars = array('+','/'); $replace_chars = array('-', '_'); if($file_path[0] != '/'){ $file_path …

Member Avatar for peter_budo
0
297
Member Avatar for Doogledude123

My girlfriend, as confused as she is when I talk about programming, wants me to program her something. She's away on vacation to Australia right now. Of course, I told her I would program something for her in time for when she gets back. But the part that I'm stuck …

Member Avatar for kb.net
0
189

The End.