31,001 Topics

Member Avatar for
Member Avatar for francis994

Please i've got problems reading from a recordstore(does not return any results when it reads any index beyond d deleted index) after calling the delete method with a specified index. Can anyone help?

0
109
Member Avatar for thanatos1

Hello guys, i have a question regarding how to change the origin of a window, particularly a JFrame. I'm essentially running a program called "Fraps" to see the frames per second of my JFrame, with this program, you can display the fps on any 4 corners of the window currently …

Member Avatar for NormR1
0
262
Member Avatar for GTech4life

Can someone please help me "write a drawTree method for the Turtle class" I am given the following information: World w = new World(); Turtle t = newTurtle (320, 480, w); The turtle will begin at the middle of the bottom of the World, facing North. Use the drawRectangle method …

Member Avatar for NormR1
-1
217
Member Avatar for vriend12345

When I am trying to design an algorithm , I had a programming problem in Java .. I want to write M nested "for" like that: for (I[0]=1; I[0]<=N; I[0]++) for (I[1]=1; I[1]<=N; I[1]++) ... for (I[M]=1; I[M]<=N; I[M]++) { Statements; } Where M is entered by the user during …

Member Avatar for vriend12345
0
116
Member Avatar for Captain_Ludd

Hello all, Im new here and looking for some advice re the google maps javascript API (which im also pretty new at) The background: I have managed to get some pages that use the googlemaps interface up and running add markers to them etc and allow the user view directions …

Member Avatar for 72dpi
0
261
Member Avatar for falcon221

I m trying to create hello world example using rmi but till not succeeded.I got error in server file "Server Error java.rmi.ConnectException: Connection refused to host: 192.168.1.5; nested exception is: So please help me out. public class Server implements Hello { public String sayHello() { return "Hello World!"; } public …

Member Avatar for ~s.o.s~
0
135
Member Avatar for anuj_sharma

I have created an application which puts all the images at a user defined location in a rtf document. The code is working fine and the images are getting inserted. However, if I open the document and add some text manually and save the file, the file size increases dramatically. …

Member Avatar for anuj_sharma
0
630
Member Avatar for Bladtman242

I have this annoying problem: I am filling a HashSet out with Road objects, only doing so to avoid duplicate elements. However, the output from lines 81 though 95 shows that the set contains duplicate elements. Sorry for the messy code, this is a pretty ad-hoc sollution, in addition to …

Member Avatar for NormR1
0
3K
Member Avatar for Torf

I'm doing an actually simple practice problem from the book, but I am still not sure how to correctly do it.. It's just converting pseudo code. 1st part > num SIZE = 5 > > num VALID_ITEM_PRICE [SIZE] = 0.59, 0.99, 4.50, 15.99, 17.50, 39.00 > > stack int validItems …

Member Avatar for NormR1
0
152
Member Avatar for soham.m17

How can I keep the lines that have been drawn previously after calling repaint() this is my paintComponent public void paintComponent( Graphics g ) { graphics2D = (Graphics2D)g; graphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); graphics2D.setPaint(Color.white); graphics2D.fillRect(0, 0, getSize().width, getSize().height); graphics2D.setColor(Color.black); } I've another method public void show_line(line a) { graphics2D=(Graphics2D)this.getGraphics(); for(int i=1;i<a.getLine_segs().size();i++) { Point …

Member Avatar for soham.m17
0
210
Member Avatar for pendo826

import javax.swing.JFrame; public class MainApp { public static void main(String[] args) { new MainApp().start(); } public void start() { CalculatorUI obj = new CalculatorUI(); obj.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); obj.setSize(275,275); obj.setVisible(true); } } import java.awt.FlowLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JOptionPane; import javax.swing.JTextField; public class CalculatorUI extends JFrame { //Variables. …

Member Avatar for pendo826
0
148
Member Avatar for utkarshsahu

I am basically trying to make a TicTacToe game in Netbeans GUI builder. I have nine(3x3) buttons to show a grid for the game and that's where you mark X and O's. I want to make it one player game. I wanted to know how to make an array of …

Member Avatar for utkarshsahu
0
110
Member Avatar for rohit_static

I have a jsp page which has post comment box. I have written a servlet which takes a comment from the text area for the comment box and writes the comment to the database and redirects all the comments stored in the database to the page for display(using request dispatcher). …

Member Avatar for Philippe.Lahaie
0
165
Member Avatar for anuj_sharma

Hi, I created an application which allows a user to capture screenshots and save them as images at a pre-defined location. Now, I want to insert the saved images to a word document. I am aware of Apache POI, but that is still under development and it seems that you …

Member Avatar for anuj_sharma
0
1K
Member Avatar for anuj_sharma

am trying to add images to a rtf document. I am able to add images to the document but I can't append any images. This means that when the 2nd Image is added, the first image is removed. I think that whenever the code is executed a new rtf document …

Member Avatar for anuj_sharma
0
993
Member Avatar for daemonlies

Hey everybody, New to the java scene and having major issues, it would be appreciated if someone could have a look at my coding and see where i'm going wrong. I have a few 1. When i press the 'start new game' button the random number resets but not the …

Member Avatar for NormR1
0
143
Member Avatar for gigglygeckoq

I am new to programming, I am trying to learn how to program in Java through some old programs I found online, and yet I seem to be struggling. This is the program I wrote to fill a linked list with 10 numbers using a loop and then just printing …

Member Avatar for JamesCherrill
0
108
Member Avatar for woodenduck

Hey all, I want to write an application that I can run from the console where it loads settings from a config file. I also want to be able to double click on the executable and obtain a GUI where I can specify settings that will be stored in the …

Member Avatar for NormR1
0
186
Member Avatar for drico7041

Hello, I go to Georgia State University with a Computer Science major. I was wondering what what be a good gpa to graduate with in order to put me ahead of the competition. Mind you Georgia State is my of the top 5 school in Georgia. Thank you

Member Avatar for Rashakil Fol
0
247
Member Avatar for Torf
Member Avatar for JamesCherrill
0
118
Member Avatar for reaper1395

I'm sure that there is an article on here already about this, but I didn't see it. I'm trying to make my java application executable so I can share it with friends but whenever I use eclipse to make it a jar or executable jar file and send it to …

Member Avatar for reaper1395
0
140
Member Avatar for mikekhd

mport java.awt.Color; import java.awt.Graphics; import javax.swing.JOptionPane; why this is not working need help public class NewClass { static String myBinary; public static void main(String[] args) { String code = JOptionPane.showInputDialog("Please enter zipCode: "); BarCode myBar = new BarCode(code); myBinary = myBar.getCode(); int length= code.length(); if (length != 5 && length!=9) …

Member Avatar for NormR1
0
267
Member Avatar for shean1488

Hi everybody, I'm just wondering what is the more eficient and compact way to write statements like this if(site.next(1) == null) { return false; } if(site.next(2) == null) { return false; } if(site.next(3) == null) { return false; }

Member Avatar for shean1488
0
91
Member Avatar for jjoensuu

Hi, a question about stand-alone Java applications that do not have a background DB. In our Uni class we were asked to build a very small application using JOptionPane methods such as "showInputDialog". The application asks for users name and birthdate and at the end displays a summary of these …

Member Avatar for JamesCherrill
0
438
Member Avatar for hwoarang69

i really hate php and javascrip but i really want to make a social network website just for fun. so i wanted to use java, sql, and html to make. i already know these 3 languages and i know how to set a database but i dont know how to …

Member Avatar for stultuske
0
124
Member Avatar for jayson_g

Im having a difficult time finding info on how to set up a combobox listener for my project. My book has 1 example and it uses audio files.(no help) My project consists of a GUI panel with a splitpane that that has a list of info on the left for …

Member Avatar for jayson_g
0
121
Member Avatar for whileiforelse

Hi all, I'm working on a simple Java project on student database. One of the methods I need to implement obviously involves searching for a student in the student registration using the student id input. Here is what I've been asked to do: *-searchStudentRegistration(String studentId): Using the studentId you will …

Member Avatar for whileiforelse
0
193
Member Avatar for drameshgar1

I got quick question regarding Java less say i got provided with this code: public void printNext(int x){ System.out.println((x+1) % 3); } public void printSequence(){ for (int i=0; i<5; i++) printNext(i); } The question is : 'What sequence of number is printed by printSequence()?' Ok first its going do 0+1=1 …

Member Avatar for JamesCherrill
0
103
Member Avatar for anuj_sharma

Hi, I am trying to create document using iText. I am using Eclipse IDE. I've imported the jar files (itextpdf-5.2.1.jar and itext-xtra-5.2.1.jar). However RtfWriter2 is not being recognised as a class. Document doc = new Document(); RtfWriter2 writer = new RtfWriter2(); RtfWriter2.getInstance(doc,new FileOutputStream("testRTFdocument.rtf")); Can someone help me in figuring out …

Member Avatar for anuj_sharma
0
359
Member Avatar for litchi

Hi :) Is it better to have a one file program (ex. MyProgram.class) or a multiple file one (ex. Main.class and Gui.class and Draw.class)? thx

Member Avatar for Username field
0
140

The End.