154 Posted Topics

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
196
Member Avatar for shadowsrose1

Always post your code of what you've done so far when you say you're stuck or not sure what to do next. We can't help you if we haven't seen what you've done so far and give you guidance on corrections and on what to do next. As hericles said, …

Member Avatar for JamesCherrill
0
3K
Member Avatar for laguardian

Slavi, Understandably you might wanna go for an arraylist. However in this case it isn't necessarily needed. Check JeffGrigg's reply for something that works using the setup laguardian is using.

Member Avatar for Doogledude123
0
286
Member Avatar for Slavi

A general rule I follow by, is that the only thing needed in main is a call to create a new instance of the class. That way I can keep the class not static and everything else that way too, unless needed.

Member Avatar for JamesCherrill
0
227
Member Avatar for iamcreasy
Member Avatar for VernonDozier

Antonio, although your solution may help, the thread is over 5 years old. Therefore your solution no matter how good it is, is useless now. When you post in a thread, check the original posts date to see if it's an appropriate thread to post in first.

Member Avatar for Doogledude123
0
4K
Member Avatar for hemp31

Start with something else first. Watch a tutorial series to help you get started, code along with the videos and understand the code. After you understand the syntax and the basics of what you might need to start this project then come back to it.

Member Avatar for stultuske
0
278
Member Avatar for Doogledude123

**Sudoku Solver** I am writing a program to solve Sudoku Puzzles. This thread will contatin my progress throughout the project and hold any questions and replies.

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

length() is actually a method inside of all Arrays. It returns how many values are stored inside of the Array. The for loop is necessary in that example, however because it is an Array, you could simply use `args[1]` or some other number. It highly depends what you need it …

Member Avatar for stultuske
0
517
Member Avatar for Doogledude123

I travel with my tablet a lot (iPad 2nd Gen) and I'm often checking out the forum and posting when I can, but I've been getting sick of it because I cannot post code back in reply. The Editor Toolbar just doesn't show up on mobile. I don't know if …

Member Avatar for Dani
0
387
Member Avatar for Doogledude123

I'm trying to make this as easy as possible but I'm stuck. Inside the for loop, if the input entered was not a number or wasn't valid, it moves on, but I don't want it to. I want it to repeat that interation. Is there a possible way to do …

Member Avatar for JamesCherrill
0
398
Member Avatar for Doogledude123

I am trying to create a File Searching Utility that finds all Files with a given Name which searches all Folders (Sub Directories, and Sub Directories of Sub Directories) in a given Directory. I was thinking of a way to use For Loops, or For Each, but that would mean …

Member Avatar for JamesCherrill
0
265
Member Avatar for Doogledude123

I'm trying to create a set of selectable labels, New Game, Load Game, Options, and Exit. I created a MenuItem class which extends Label, and set up the constructor to use the standard stuff expected from a Label. Here is the class. package com.irridium.echo.menu; import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.scenes.scene2d.ui.Label; /** * …

Member Avatar for Galbatorix
0
679
Member Avatar for cb1991110

What might fix your problem is `Integer.getInteger(String num);`. This returns null if the String passed is not numeric. Scanners are generally not a good idea, use a [BufferedReader](http://docs.oracle.com/javase/7/docs/api/java/io/BufferedReader.html).

Member Avatar for Doogledude123
0
226
Member Avatar for Violet_82

Alright, so I am working with GBL's too and I just came across this post which is perfect timing I guess. Quick question about the insets, can you add a negative value to bring the cell closer to the next or one previous? Also, is it better to declare the …

Member Avatar for Violet_82
0
665
Member Avatar for Netherblood

Create a JFrame, and a button. Button code should increase an integer variable by one. When the program loads, read the first line of a txt file and set the variable equal to the integer value of that. Do some error checking on that. Use a BufferedReader to read the …

Member Avatar for JamesCherrill
0
136
Member Avatar for SuperPink

I'll give you some help with the Booking and Unbooking of rooms. If you think about it logically, a room is inside a Hotel, yes? So let's put the booking methods in the Hotel Class. public void bookRoom() { } What do you need to know about the room being …

Member Avatar for lalaRMa
0
2K
Member Avatar for Doogledude123

I know with Lists you can instantiate them to an ArrayList, but is this generally a good idea? Is it better to do 'List<?> list = new ArrayList<?>();' rather then 'ArrayList<?> aList = new ArrayList<?>();'?

Member Avatar for JamesCherrill
0
182
Member Avatar for Doogledude123

I know you can create nested classed (or just classes declared outside of the class in the same file) but what is the point of doing this? Why not just create a new class file?

Member Avatar for JamesCherrill
0
203
Member Avatar for masonketcham

As jwenting said, these are missing imports. I have a feeling that you're a begginer and you're going through some tutorials just copying code. If you have done anything previous to this by using the above method, awesome! I would suggest going back a few steps and redoing what you …

Member Avatar for Doogledude123
0
349
Member Avatar for surya55

I don't know if anyone else noticed, but this question was asked just the other day. Please double check for a thread asking the same thing before posting a new thread.

Member Avatar for Doogledude123
0
205
Member Avatar for Doogledude123

Alright, so I am simulating a rice roll 100 times, repeatedly. It's getting some whack numbers for some reason, I can't find the problem in code. I have done some printing of the different variables and it seems fine, but I know theres something wrong. package com.github.geodox.dicerollingstats.main; import java.util.Arrays; import …

Member Avatar for Doogledude123
0
344
Member Avatar for SintherPal

No one will help you do your homework. The whole reason for projects is you test **your** knowledge, not some one elses. When you signed up you also agreed to the following "Do provide evidence of having done some work yourself if posting questions from school or work assignments." http://www.daniweb.com/community/rules …

Member Avatar for SintherPal
0
283
Member Avatar for masonketcham
Member Avatar for Doogledude123

Alright, so I am building a Converter to convert ASCII to Binary and for some reason, the for each loop stops working when it hits a space, and I have no idea why. I'm probably just over thinking it. Extra: Can you tell me how to force the output binary …

Member Avatar for Doogledude123
0
5K
Member Avatar for Doogledude123

Alright, so I found a tutorial on how to use lists to make a "TreeList" type thing, basically a list, ordered or unordered, that has a nested list that is collapsible. However, it doesn't seem to be working for me. Here's some code that I'm sure you will figure out. …

0
191
Member Avatar for Doogledude123

Alright so I want to Display a Browser Not Supported Message if the user is using IE 9 or less. Yes, I am limiting the users, I know. I want this done in JavaScript ONLY. Anyway, I have found a way that checks for IE. If 'ie' = null the …

Member Avatar for Doogledude123
0
15K
Member Avatar for sammy1231

Please post some code of what you have done so far, and what you are stuck on. If you don't have anything yet, break what you need to do down into groups.

Member Avatar for JamesCherrill
0
143
Member Avatar for JCSOW

Line 13: Spelling Mistake, Line 18: Scan for Int, Line 24 - 34: Use For Each, with Char, and a Char Array containing the String That should get you started.

Member Avatar for Doogledude123
0
217
Member Avatar for Doogledude123

The "Invalid Property" Error is thrown at Line 20, which is for the TextField. No idea as to why it is being thrown. <?xml version="1.0" encoding="UTF-8"?> <?import java.lang.*?> <?import javafx.scene.control.*?> <?import javafx.scene.layout.*?> <?import javafx.scene.text.*?> <VBox prefHeight="400.0" prefWidth="284.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"> <children> <AnchorPane maxHeight="-1.0" maxWidth="-1.0" prefHeight="375.0" prefWidth="285.0" VBox.vgrow="ALWAYS"> <children><Button fx:id="zero" layoutX="14.0" layoutY="321.0" …

Member Avatar for Doogledude123
0
999
Member Avatar for Doogledude123

Alright, so I have seen `<<` and `>>` in a few different Java Programs and I have an idea of what they do, but I have no idea what you would use them for. I haven't ran into a problem where I need to use them, so if someone could …

Member Avatar for Doogledude123
0
186
Member Avatar for romdan94

I programmed this myself as a challenge, could someone check it over to see if all the requirements were met? Should I post it in a new Thread and link it here?

Member Avatar for JamesCherrill
0
277
Member Avatar for andi-dev

If you aren't getting the proper amount back, as jwenting said, if you expect it as a percent you need to divide it by 100. Also, I would put some brackets in there for easier reading, and sometimes they matter.

Member Avatar for Doogledude123
0
132
Member Avatar for Doogledude123

I was just thinking about all of the unsolved threads, the ones that actually are solved, and I was thinking, maybe @Dani could add a 'Please Mark as Solved' button that users could click to notify the owner of the thread that they should mark it as solved. Obviously, this …

Member Avatar for Dani
4
341
Member Avatar for duncan55

Is there any reason why you arent using a for loop? Heres an example. for(int i = low; i < up; i += 2) { low += 2; }

Member Avatar for jwenting
0
208
Member Avatar for parsa123

So you have 2 classes, the main class containing the main method, and a class f? You also have 2 instances of class f, both with numbers passed into them when they were instantiated? What I think you want to do is get the numbers from both instances and add …

Member Avatar for Doogledude123
0
162
Member Avatar for Doogledude123

Does clear use removeAll method for listViews? I have a program that reads a file and stores the data in multiple arrays. I then use that data from the arrays to display them in a ListView, TextFields, a ComboBox, and a TextArea. I am also using an ActionListener to get …

0
182
Member Avatar for Doogledude123

I am trying to determine collision in a 2D Side Scroller environment using Rectangles. However, the way most people do it is to get the bounds of the Tile. I do not use Tile's in this case, I am just drawing Simple Full Colored Rectangles using Graphics2D. `g.drawRect(int x, int …

Member Avatar for jwenting
0
485
Member Avatar for Doogledude123

Okay, so I have a ListView populated by an Array, which is populated by a text file. I also have 3 TextBoxes which are changed to different values in multiple Arrays using the Selected Index. My problem occurs when reloading the ListView after saving the text file. The values from …

Member Avatar for JamesCherrill
0
701
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
305
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 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 Doogledude123

Cannot get FXMLLoader to load this fxml. Error: Feb 19, 2014 11:25:01 PM com.github.geodox.goldminer.GoldMiner start SEVERE: null java.lang.NullPointerException: Location is required. at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2825) at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2809) at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2795) at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2782) at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2771) at com.github.geodox.goldminer.GoldMiner.start(GoldMiner.java:24) at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319) at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:219) at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:182) at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:179) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:179) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:76) at com.sun.glass.ui.win.WinApplication._runLoop(Native …

Member Avatar for Doogledude123
0
5K
Member Avatar for Doogledude123

`final PerspectiveCamera camera = new PerspectiveCamera(true);` The constructor PerspectiveCamera(boolean) is undefined. http://download.java.net/jdk8/jfxdocs/javafx/scene/PerspectiveCamera.html Clearly says that it can accept a boolean for "verticalFieldOfView" Why is Java giving me this error?

Member Avatar for Doogledude123
0
356
Member Avatar for Doogledude123

Alright, so I am thinking about an idea of a useless application, however it is interesting me. A 3D "perspective" of color. I know, confusing. But think of it this way: Movement given an x, y, z coordinate. Color given r, b, g = x, y, z I was also …

Member Avatar for Doogledude123
0
291
Member Avatar for GUIPaPa

He told you what code you needed to put in. > size/preferredSize/minimumSize setPreferredSize setMinimumSize setMaximumSize

Member Avatar for GUIPaPa
1
503
Member Avatar for Doogledude123

I've noticed when watching videos, usually people import everything. Such as `import javax.swing.*;`. So my question is, is it better to Import everything? Or only the things you need indiviually? I've heard it slows down your program if you import alot of things, is this true?

Member Avatar for jwenting
0
258
Member Avatar for sciprog22
Member Avatar for ZaneDarklace
Member Avatar for Doogledude123

So I just finished up a way to solve Standard Form Quadratic Equations, Now I want to code a way to automatically Convert a given Standard Form equation to Vertex Form, or Vertex to Standard. Is it possible due to the fact that you have to get a perfect square …

Member Avatar for Doogledude123
0
1K

The End.