32,199 Topics

Member Avatar for
Member Avatar for smithy_2009

Hi, I'm just learning to program and I'm stuck on a basic problem, printing today's date in a form typified by (e.g.) 28 February 2011 [CODE]import java.util.*; class Date { int day, month, year; } class PrintToday { static Date thisDay() { Date today = new Date(); GregorianCalendar c = …

Member Avatar for mKorbel
0
108
Member Avatar for MFal

I really appreciate all the help i've been getting on my project lately from you guys, and hopefully this will be the last problem. I've written an applet, and it uses ActionListener to detect when the button is pressed. The program is [I]supposed[/I] to go through my methods when the …

Member Avatar for Ezzaral
0
3K
Member Avatar for hanvyj

I have made a small example to illustrate my problem. I have overwritten the createToolTip method for a custom JComponent (eventually it will depend on where abouts the mouse is in the component as to what text to bring up) At first I thought it wasn't being called, but i …

Member Avatar for mKorbel
0
1K
Member Avatar for Sheena26

i need help on my project 1. Write a program that will print out statistics for eight coin tosses. The user will input either an “h” for heads or a “t” for tails for the eight tosses. The program will then print out the total number and percentages of heads …

Member Avatar for Sheena26
0
1K
Member Avatar for rude04

hello everyone,i need to make an encryption/decryption program and I'm almost finished, the problem is when i tried to add some gui an error about throwing exception keeps showing.. this is the code without the gui and it works just fine because the [B]throws Exception[/B] is in the main.. [CODE] …

Member Avatar for rude04
0
718
Member Avatar for 24x24

Ok I have another homework problem. Essentially I am to make a text file of randomized characters ( leters bothe upper and lower case, numbers, spaces and specialized characters) and import it as a string into my program. From there I am to make all lowercase letters uppercase. I think …

Member Avatar for 24x24
0
434
Member Avatar for phycoCoder

Dear users of "daniweb" This question has no coding issues but is still about java and java code i thought this would be the best place to post such a question its for my schools Program Dossier. I need a [library or API] that can manipulate a robotic arms motors …

Member Avatar for peter_budo
0
204
Member Avatar for kubiak

Please help me with the double linked list, when I write the command in terminal to test main class by my source code the cmd.exe throw me: Exception in thread "main" java.lang.NullPointerException at homework.List.add(Homework2.java:19) at homework.Homework2Main.main(Homework2Main.java:20) In 19 line is something wrong in source code, I tag him. Please I …

Member Avatar for javaAddict
0
291
Member Avatar for emcyroyale

Basically this program uses an abstract class which 3 other classes extends to so that in the end an overridden toString() method will print out how many pages must be read for each class. Okay, well this program is for a class, but I am kinda of stuck because my …

Member Avatar for quuba
0
205
Member Avatar for bharath54321

could anybody help me pls. the below is the text file. It contains n message flows and n nodes. i have to search each message flows which is available in that text file and if i select any text file it shoukd display the nodes which are available ... could …

Member Avatar for Katana24
0
283
Member Avatar for Stazloz

I am writing a program for school, its a problem from Deitel and Deitel Java: How to program. I have to write a turtle drawing program. It works great, what I have now is a method named enterCommands() that works that takes no arguments that can be used to cycle …

Member Avatar for masijade
0
121
Member Avatar for gunitwarriors

I am having problems. I am trying to run a program that output suppose to be mutiple triangles but when I run it. I only get one. Here is the code please tell me what I am doing wrong. Thank you Kevin! [code] import java.awt.Color; import java.awt.Graphics; public class Triangle …

Member Avatar for JamesCherrill
0
77
Member Avatar for ChieftanBill

I came across a code snippit from my textbook with a : symbol. [CODE] for (String arg : arg){ System.out.println(arg); } [/CODE] I'd like to know what that : is, and what function it serves. Thanks,

Member Avatar for JamesCherrill
0
104
Member Avatar for Shizuo

hes the code [code]import java.io.*; import java.awt.*; import java.awt.event.*; import java.lang.*; public class CreateEventFile extends Frame implements ActionListener, WindowListener { private Label companyName = new Label("Event Handlers Incorporated"); Font bigFont = new Font ("Helvetica", Font.ITALIC, 24); private Label prompt = new Label("Enter this month's events"); private TextField host = new …

Member Avatar for masijade
0
169
Member Avatar for qwerty_jakarta

[B][COLOR="Red"]Hello [/COLOR][/B] I am using java 1.6 and RXTXComm package (Javax.comm) package. [B][COLOR="Green"]HOW can I read data from a electronic weighing machine?[/COLOR][/B] Please help give source code................

0
47
Member Avatar for cjd_1986

I have to write this applet for my CIT 130 class. I understand that you can not give solutions nor do I want you to do my homework for me I just need some pointers. The questions ask to "Write an applet that draws a house with it's door and …

Member Avatar for cjd_1986
0
193
Member Avatar for lashbandi

heyy.. i am getting error on line 51 "Stack<Character> stack = new Stack<Character>();"..how can i fix it? please help. [CODE]import java.io.IOException; import java.util.Scanner; public class SymbolChecker { private String enter; public SymbolChecker(String in) { enter = in; } Scanner input = new Scanner(System.in); public void check() { int stackSize = …

Member Avatar for ~s.o.s~
0
222
Member Avatar for manish250

Hello all i have created a java application which is writing to log files to specific path.logs are created successfully.When i use cat command to show the contents it is showing the correct data but when i use vi to open the file it is showing the contents like binary …

Member Avatar for ~s.o.s~
0
228
Member Avatar for java_stud

i'm having a problem with my code for evaluating postfix expressions. any comments on what's wrong on my code? [code] import java.io.*; import java.util.*; import java.util.Stack; public class Eval { private Stack<String> operatorStack; private Stack<Integer> operandStack; public int evaluate(String output) { StringTokenizer s = new StringTokenizer(output);//divides into tokens int value; …

Member Avatar for ~s.o.s~
0
218
Member Avatar for pramod.singh

in my application i have to use multiple databases. i am using i-batis. i wants to access multiple database instances through I-Batis. i dont want to use multiple configs. Is it possible to connect to multiple databases using same configs file in i-batis. Any help will be appreciated. Thanks !

0
42
Member Avatar for musikluver4

I want to be able to create JLabels, all different names, with a for loop ex: [CODE] static JLabel[] totalAYearLabelYr = new JLabel[termYears]; [/CODE] So I got 30 JLabels named totalAYearLabelYr, which I'm not sure you can have 30 JLabels named the same thing. I wanna name them all totalAYearLabelYr1 …

Member Avatar for musikluver4
0
7K
Member Avatar for oldezwe

-List of names in a database -names have double assigned to them, x -each name has random 10 digit double generated from 0 to x -the name with the highest number double is assigned to a variable -if two names generate the same double then the name with in the …

Member Avatar for Progr4mmer
0
169
Member Avatar for FUTURECompEng

[ICODE]I need to solve a 3x3 matrix, x,y,z of a funtion (I only have a 2x2 matrix determinant solved) I have figured out how to solve the determinant with this code and I have created another attached program that displays any size matrix I thought it might help.[/ICODE] [CODE] public …

Member Avatar for FUTURECompEng
0
650
Member Avatar for insanely_sane

Hey guys. So I want to learn how to do a simple I/O to and from a file. I want the simplest way to do this. My teacher sent me her program but I don't think I get what she is doing and it's giving me an error. So I …

Member Avatar for Progr4mmer
0
220
Member Avatar for jimJohnson

I have a very simple question for someone. I am trying to get back into java programming and I downloaded the latest textpad. Can someone please provide me the link of what else I need? I am on a Windows 7 machine.

Member Avatar for Progr4mmer
0
135
Member Avatar for wonder_laptop

Hello, I have written some java classes to generate a random network. The network is made of : 200 nodes . Each node has a maximum of 50 neighbors. What i want is to Randomly chose a node from that network and GRAPHICALLY show it with its one hop neighbors …

Member Avatar for Taywin
0
125
Member Avatar for wonder_laptop

I created a simple [B]Node.java[/B] class, where each Node instance has an 1-id variable of type int 2-Neighborlist of type Arraylist I wrote a code that gives me a random network, made of 200 nodes, and each node can have up to 55 neighbors. [CODE]for(i=0; i <200; i++ ) // …

Member Avatar for jon.kiparsky
0
259
Member Avatar for jfountai

Hi, I am new to java (normally program in perl and bash). I have an array that has X amount of rows that look like this: 2011-02-24,XXXDAO_456912 - (none) - (direct),(none),(direct),(not set),(not set),0,5447,1,3639.71,3521.86,0,0 What I need to do is take this column - XXXDAO_456912 - (none) - (direct) - and …

Member Avatar for jfountai
0
170
Member Avatar for Shizuo

it give an access denied<java.io.filepermission Item.txt write> error any suggestion for a simple id generator? [code]import java.applet.Applet; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.io.*; import java.lang.*; public class Shoes extends Applet implements ActionListener, ItemListener { Font SansSerif = new Font ("SansSerif", Font.BOLD, 12); Button create = new Button("Create a …

Member Avatar for Taywin
0
131
Member Avatar for CMAUK

Hi guys, ran into a small problem, i can read & write anything i want to a text file as well as append to the end of the line but I cant seem to figure out how to edit a specific line. Lets say in the text file i have: …

Member Avatar for jon.kiparsky
0
3K

The End.