32,204 Topics

Member Avatar for
Member Avatar for idlackage

I'm supposed to allow the user to draw shapes based on their combobox choices (eg. line, rectangle, circle), colour, fill state, etc. However, nothing is showing up. Model class: [CODE]import java.awt.Color; import java.awt.Graphics; import javax.swing.JPanel; import javax.swing.JLabel; import javax.swing.JOptionPane; import java.awt.event.MouseAdapter; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import java.awt.event.MouseEvent; public class DrawPanel …

Member Avatar for Ezzaral
0
189
Member Avatar for leliana

hi .. i wanna read text file in binary format ... 4 ex : lele and raz ..."in text file " l=10011001 e= 011110011 ..... "cmd (8 bit per letter)" and but them in an array ...i tried the type StringBuilder but it didnt work ... i need a method …

Member Avatar for leliana
0
1K
Member Avatar for ozidub

Hi, I'm new to Java and am having a problem getting my program to run, any help would be greatly appreciated. Here is the program: [CODE]//This program displays a message asking the user if they //want to know the Top Premiership Players. If they say Yes, //they will then be …

Member Avatar for masijade
0
102
Member Avatar for neovo-88

Hi, Im new to java and was wondering if someone could help me with my problem. Im writing a program which will calculate how long a journey will take, the user will need to enter a character to represent what type of road/speed they are doing and how long the …

Member Avatar for neovo-88
0
165
Member Avatar for Dark.Paladin

hy im having a little problem with a loop with jgrasp here is my basic program [code] import javax.swing.JOptionPane; public class loops1 { public static void main (String[]args) { String name do { String name = JOptionPane.showInputDialog ("who is the cleverest person in the room?"); } while (name != "erin"); …

Member Avatar for Dark.Paladin
0
155
Member Avatar for rogue005

I am doing a project on a network printer spooler. I want to know what APIs are available in Java to interact with a printer.

Member Avatar for gangsta1903
0
74
Member Avatar for chie12024

import java.io.*; public class EggTrader { public static void main(String[]args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int numofEggs,EggCount,Cash; double cashOnHand = 500; double pricePerdozen = 72; double unitPrice; public void buyOneDozen(double pricePerdozen) { numofEggs = Integer.parseInt(br.readLine()); numofEggs = getEggCount(numEggs,cashOnHand); } public void sellEggs(int numEggs,double unitPrice) { numofEggs = …

Member Avatar for viswaratha
0
223
Member Avatar for blazinhieu

how do i write a program that a user can input 3 numbers (between 0 and 100), then the program will compare if the numbers are bigger are smaller than each other, and weather each number is smaller than 100 or greater than 0. required 2 class file in one …

Member Avatar for stultuske
0
105
Member Avatar for solomon_13000

Does anyone know why Hibernate and Struts are referred to as a Single-tier framework when compared to Spring?.

0
83
Member Avatar for jamesonh20

Hello I am trying to underline --> 1 5 6 only the 1 2 2 2 only the middle 2 1 6 4 only the 4 I have imported the java.awt.* but im not sure how to write the code, the java api is a little confusing. [CODE]import java.awt.*; public …

0
60
Member Avatar for JavaNewbieEK

I have a two input text field window in which users input an ID and Password. I then need to compare these passwords to allowable users. What would be the best method for associating each unique password with its specific user id?

Member Avatar for javaAddict
0
160
Member Avatar for prodam

i am new both to this forum and to the programming world but I know a little of java programming, html and am really interested in becoming a full time java programmer or developer.. But get confused when i read about visual basics Pls i need clarificatiions and opinions thanks

Member Avatar for strmstn
0
75
Member Avatar for noumanayub

Hi Guys! I am doing a shopping Mall Project! I want that you people give me suggestions in order to make this project perfect... Regards Nouman Ayub.

Member Avatar for stultuske
0
47
Member Avatar for pfuturama

//less than 10= "too cold", 10-20= "avarage", 21-30="hot",bigger than 30 ="Too Hot" import javax.swing.JOptionPane; public class TmaTwo { public static void main(String[] args) { int number; int temp; String numString; numString = JOptionPane.showInputDialog ("Enter temperature:"); number = Integer.parseInt(numString); if (number < 10 ) JOptionPane.showMessageDialog(null, "Too cold", "Output", JOptionPane.INFORMATION_MESSAGE); else if …

Member Avatar for stultuske
0
104
Member Avatar for yasir iqbal

How to use delay function in turtle class in java,oop when drawing an object

Member Avatar for stultuske
0
29
Member Avatar for JavaNewbieEK

Hi, I am a student who has been given the following assignment. Before I am reprimanded for posting asking for assistance without providing an attempt at code, please allow me to explain. We have been given the assignment shown below with no explanation. We have not covered any of the …

Member Avatar for stultuske
0
187
Member Avatar for litchi

Hi :) Is there any way to look up a character's Unicode line number? Ex. Capital letter A's line number (hex) is 41 capital B is 42 etc. (more info [URL="http://www.utf8-chartable.de/"]here[/URL]) Or would I have to put them in an array manually? thanks :)

Member Avatar for litchi
0
94
Member Avatar for y7cs228

hello everyone i am creating a notepad using java swings. how to save the text in textpane with font styles ......

Member Avatar for kvprajapati
0
32
Member Avatar for chandu_517

Hi all, I'm new to JTable. I have two buttons "add Row", "Del Row" and I have some records displayed from db which contains an auto increment column. when ever "add row" is clicked a new record will be added to JTable with a auto increment column number displayed in …

Member Avatar for chandu_517
0
194
Member Avatar for PhiberOptik

Hey guys, I'm using a Point array to transfer to my panel class that draws the image. The reason I'm using coords is because it shows where the character is in the tileset for directions Ie. (20,5) is right step facing up. anyway its coming up with null pointer and …

Member Avatar for ~s.o.s~
0
98
Member Avatar for ksaihat

its java assignment i dont know how to do this part allow user to determine whether a given (whole ) number is a Fibonacci number or not print massage on the screen with the result of your option: either the number is a fibonacci number or the number is not …

Member Avatar for kvass
0
124
Member Avatar for joelRam90

Hi everyone, I'm developing a new program. ;) My "dilema" is as follows: :S Let's say that I have a Java component, a calendar, shown in the GUI and I want to cover it with and invisible label or something so it can't be modified by the user. I don't …

Member Avatar for joelRam90
0
191
Member Avatar for Bobon

I'm having a problem completing the question below. I am a Java noob so be gentle ;0. The problem is in relation to the equals() method. I have to use this method to check dates to see whether they match. Please see code below. [CODE]public boolean equals(){ if(date1==date2){ return true; …

Member Avatar for kvass
0
98
Member Avatar for David22

Hi guys. I am having issues with a program I am writing. Basically, I have a JList that stores toString() references of "Location" type objects. I want to be able to remove these. However, the "Location" type objects are stored in an ArrayList, hence requiring an overriding toString() method to …

Member Avatar for BestJewSinceJC
0
117
Member Avatar for Alex_

Hello, i made a basic java desktop application. After building the interface in the form, i compiled it and it worked perfectly. But after i added an event to a button (on click) my app won't close. I use the X button from the title bar, or ctrl+q from the …

Member Avatar for Alex_
0
2K
Member Avatar for dj118

Hi viewers, I'm in dire need of some help. I'm currently doing a program for my studies and I have successfully compiled it and tested it. However when I try to execute the program it comes up with the error java.lang.NoSuchMethodError: Main. I've identified the problem which is the fact …

Member Avatar for dj118
0
193
Member Avatar for achiman

Hey please I am trying to create a chat system but my main server routine in my server class keeps give error saying its out of bound. I think it is the port number but dont know how to fix it. Is there anyway I can hard code the port …

Member Avatar for masijade
0
82
Member Avatar for upasanac

I have this function which computes the position record of 6 requests. ( ie x,y,dx,dy--these are the position records for a request) I want to display these position records in a textfield, which i have in my GUI, as soon as i press the "positionrecord" button. I am able to …

Member Avatar for Ezzaral
0
153
Member Avatar for hallinan

[B]Hi I am trying to create a generic class form existing code I have tried to figure it out but with no avail if anyone could help it would be much appreciated I have tried to do it and this is what I have so far[/B] Here is the Class …

0
52
Member Avatar for bustersox

I am having issues getting my code to work properly. The objective of the program is to allow the user to enter 5 scores and then it is supposed to calculate the mean and rearrange the data set from highest to lowest (descending order). I am supposed to run it …

Member Avatar for stevelg
0
2K

The End.