32,199 Topics

Member Avatar for
Member Avatar for Proda

Hello everygone!! I signed up here hoping I will receive some help. I realize that every 2nd person writes: I am new...bla bla bla. I am new:)...I was sitting last 2 days trying to solve the issue and I think I am close but I don't see something. This is …

Member Avatar for leiger
0
232
Member Avatar for spittaxjets

I am currently working on writing a simple vending machine that dispenses just one drink, I am just a beginner at this so I would appreciate some help from this community. [CODE]package assignment1; public class VendingMachine extends java.lang.Object{ // fields java.lang.String givenDrinkName; private int givenDrinkPrice; private static final int INITIAL_BALANCE …

Member Avatar for leiger
0
140
Member Avatar for Alviery

this is my problem! I have to create a console application that asks for numbers of quarters, dimes, nickesl,and pennies. I have to use the Scanner class that read in the integer values for each coin. Calculate total values in cents. Calculate number of dollars and remaining cents. [CODE]import java.util.Scanner; …

Member Avatar for Taywin
0
223
Member Avatar for Kevingon

Hi, I'm trying to set custom fonts, I can do it without problem with this code: [CODE] InputStream is = this.getClass().getResourceAsStream("/src/someFontName.ttf"); Font f=null; try { f = Font.createFont(Font.TRUETYPE_FONT,is).deriveFont(15f); } catch (FontFormatException ex) { Logger.getLogger(PanelLiquidacion.class.getName()).log(Level.SEVERE, null, ex); } catch (IOException ex) { Logger.getLogger(PanelLiquidacion.class.getName()).log(Level.SEVERE, null, ex); } txtPlace=new JTextField();txtPlace.setBounds(185,10,310,20); if(f!=null){ txtPlace.setFont(f); lblPlace.setFont(f); …

Member Avatar for Kevingon
1
631
Member Avatar for lbgladson

I have an assignment Enhance the CashRegister class so that it keeps track of the total number of items in a sale. Count all recorded purchases and supply a method int getItemCount() that returns the number of items of the current purchase. Remember to reset the count ast the end …

Member Avatar for Taywin
0
3K
Member Avatar for Judas3213

I have three classes. I have a main app, a Draggable class, and a creator class. I want it so that when i click on one rectangle it produces the same exact dimensions as the shape i pressed. However, the problem is that when I use mousePressed, it seems that …

Member Avatar for NormR1
0
162
Member Avatar for lucas.ploeg

Hi, I have a program that generates an outputstream with XML-data. With a socket connection, I have to read multiple XML-files from the inputstream. To read only one XML-file from the inputstream is not a problem, the fact that there are more than one and I have to split up …

Member Avatar for JamesCherrill
0
3K
Member Avatar for Syrne

Hi guys (again), I have a new issue. I am trying to bubble sort my array of objects to display in alphabetical order. Here's the code: [B] Subscriber class:[/B] [CODE]package assignmentone; import java.util.Scanner; import java.util.StringTokenizer; import java.util.Random; /** * * @author Bill */ public class Subscriber { //Field declarations private …

Member Avatar for Taywin
0
2K
Member Avatar for glamourhits

Hey everybody I really need help on a problem in a Java code. Any help would be really appreciated. The problem is to : Write a test program that prompts the user to enter a11, a12, a13, a21, a22, a23, a31, a32, a33 for a matrix and displays its inverse …

Member Avatar for Ezzaral
-1
2K
Member Avatar for cherrymae.calma
Member Avatar for stevanity
0
159
Member Avatar for simply2smart

Hello I am using windows vista and the problem is that \r i.e., carriage return does not work properly on my system. When I run my java code, it inserts a new line rather than returning the carriage. Can anyone suggest a solution to this problem?

Member Avatar for javaAddict
0
196
Member Avatar for srinidelite

[CODE] import javax.swing.JFrame; public class snake extends JFrame { public snake() { add(new Board()); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setSize(320, 340); setLocationRelativeTo(null); setTitle("Snake"); setResizable(false); setVisible(true); } public static void main(String[] args) { new Snake(); } }[/code] This is Board.java file: [code]import java.awt.Color; import java.awt.Font; import java.awt.FontMetrics; import java.awt.Graphics; import java.awt.Image; import java.awt.Toolkit; import java.awt.event.ActionEvent; …

Member Avatar for srinidelite
0
192
Member Avatar for javaNooblet

Hi All, I was having trouble with getting my program to display all the necessary conversions. Here is a snippet of the code to help explain what I want to do: [CODE] private class CalcListener implements ActionListener{ public void actionPerformed(ActionEvent e){ String centInput, inchInput, meterInput, yardInput; double cent, inch, meter, …

Member Avatar for NormR1
0
4K
Member Avatar for neemo6

Ok im exhausted and just want to go to bed and this has been frustrating me for the last 45 minutes. This method needs to include a check for a 10 digit number from the acctNum and then parseInt but im just brain locked as to where to even put …

Member Avatar for Taywin
0
124
Member Avatar for OblibSystems

So basically i've been thinking really about the different programming languages as i have been looking at computer science courses at university. A lot of the courses use java as their main programming language. It got me thinking, is Java the future of programming and if so why? I am …

Member Avatar for OblibSystems
0
294
Member Avatar for Whilliam

Hey guys, I have this code wherein I have 4 buttons to determine what set of values to display on my jtable. I've successfully displayed my data. After running the program, clicking a button, data is displayed in the jtable. Problem is, when I minimize/maximize the window, the data disappears. …

Member Avatar for Whilliam
0
188
Member Avatar for server_crash

I've often pondered over this subject. I know the main method has a special signature the JVM looks for, but why is it static?

Member Avatar for Taywin
0
597
Member Avatar for mitchiexlolz

[CODE]I am planning to make an application that can graph all functions.(polynomials, rational, trigonometric,etc) but I can't make a decision on which programming language I am going to use. I am choosing between Java and VB.net. what are the ups and downs of these languages? Which one would be better …

Member Avatar for Taywin
0
115
Member Avatar for lena1990
Member Avatar for mKorbel
0
63
Member Avatar for abhishekwaichal

Hello frnds I need sm help for installing JAI on my computer! the file im getting from sun's site is a corrupt file! Pls Help Me!

Member Avatar for mKorbel
0
83
Member Avatar for hatebin

Hello ! As I wrote in the title. I'm looking for a Java command wchich is simmilar to ' tr -s" " ' in UNIX. tr -s"[sequence]" : Replace each input sequence of a repeated character that is listed in SET1 with a single occurrence of that character. thanks for …

Member Avatar for Taywin
0
124
Member Avatar for utoldmeulabme

Good Evening! We recently had a project about java, and i chose to make a program that measures time. What i want is like a server in computer shops, but i dont know how to make a timer, displayed while running.. i guess it must have a loop to increment, …

Member Avatar for utoldmeulabme
0
57
Member Avatar for hopstank

hi i am trying to make a CAD program that read a text file which contain a vertecises and number of triangles, which look something like this"the file" : 8 -2.0 -1.5 -0.5 2.0 -1.5 -0.5 -2.0 1.5 -0.5 2.0 1.5 -0.5 -2.0 -1.5 0.5 2.0 -1.5 0.5 -2.0 1.5 …

Member Avatar for NormR1
0
188
Member Avatar for SasseMan

Hello! I'm trying out an idea I had which requires me to capture the contents of a java window/Frame, much like a screenshot but without the window and menubar, just the contents rendered in java, i.e. an exact image of what is visible in the java application at the moment. …

Member Avatar for harinath_2007
0
125
Member Avatar for hardsoft123

Hello, I am beginner Java programmer and I would greatly appreciate help. The sections with which I need help are pointed out by comment lines. I am having a lot of difficulty with methods and I do get the basic function of them but I don't know how to implement …

Member Avatar for Rameshwar Soni
0
305
Member Avatar for Maureen

I am new to programming, so please accept my apologies if this question is simple. I have a class (say called Student). I want to store the name of the student (name) and the course (course) I have declared some variables in my Student class: [code] private String name = …

Member Avatar for manjushreekaran
0
3K
Member Avatar for Syrne

I'm having some trouble with this section of code: [CODE] for(int i = 0; i < MAX_NUM ;i++) { subList[i].readIn(); System.out.println("\nDo you want to enter another subscriber? " + "(Y/N): "); anyMoreSub = keyboard.nextLine().toUpperCase(); if (anyMoreSub.equals("N")) { break; } } while(!isDone) { menuChoice = JOptionPane.showInputDialog("Please enter the letter for " …

Member Avatar for Syrne
0
149
Member Avatar for elkowalski

hi guys i am doing an applet that reads information from a website, stores it and uses it to graph the data and displays it in a very friendly way. it works perfectly fine in the viewer when i run it in eclipse but as soon as i try to …

Member Avatar for elkowalski
0
513
Member Avatar for mastdesi

I have to do my first assignment for my java class for friday this week. So due in 3 days. I wrote the polynomial class but haven't done the driver for it yet as i don't know if my polynomial class is good. Please check and let me know if …

-1
134
Member Avatar for diew

please, i am new to java and have this project on generating a university timetable using genetic algorithm. this software is to be a GUI based software... please can any one give me ideas about how i can go about it... thanks

Member Avatar for Taywin
-1
269

The End.