35,618 Topics

Member Avatar for
Member Avatar for jogendar

i am creating a text editor using java swings, i have used rtfeditor kit for saving the file with styles,undo manager for undo/redo.bu tmy problem is that both are not working at a time,i.e., any one of these is only working.... can anyone say how to make both working???

0
53
Member Avatar for merrycit

How can I obtain a value from inside a for loop? I declared the variable in the method and not inside the loop. When I use the same variable in an if statement in the same method however, I get a message saying that the variable has not been initialized. …

Member Avatar for kvass
0
150
Member Avatar for ashkash

I need to take an n number of x and y coordinates from the user and figure out some information based on the inputted points (northmost, southmost, etc.) I wanted to know what the best data structure would be to store the inputted x and y coordinates and be able …

Member Avatar for jwenting
0
59
Member Avatar for smith!

hi there i really need help to write a java program on this i dont understand anything in java plzz i need help. ive put and attachment on so people could have a look at it. thanks [ATTACH]13921[/ATTACH]

Member Avatar for kvprajapati
0
111
Member Avatar for timrhon

Last minute attempts to find what I am doing wrong here. I am a beginning Java Programmer, as you will see, and need help understanding why my paint method will not draw onto the panel. So far all I have tried to accomplish is to get the circle object to …

Member Avatar for timrhon
0
195
Member Avatar for firebugg

Hi, I am having trouble getting back into a loop after an exception has been caught. This is what the program should do... Write a program that asks the user to input a set of floating-point values. When the user enters a value that is not a number, give the …

Member Avatar for firebugg
0
1K
Member Avatar for hendaz

Hi, I am trying to make a memory card game but im not sure how to get started with the GUI part. I have made the frame and the content pane etc and have a working menubar but as to how I would display 40 cards im not sure. I …

Member Avatar for Stefano Mtangoo
0
81
Member Avatar for Leigh Reed

Just started my first unit in Java and my lecturer has set some code with logical errors in it. I think I have found them all bar one. the problem that I am having is that when I run this script it should calculate the Tax for the dollar amount …

Member Avatar for Leigh Reed
-1
133
Member Avatar for merrycit

[CODE]public static boolean rentCar(String id) { for (int i = 0; i < collection.size(); i++) { return( if (id.equals(Car.collection.elementAt(i).carTypeId)) {// if the id equals to the collection.elementAt(i).carTypeId; System.out.println("Please insert the id number of the car you would like to rent>"); id = Keyboard.in.readString(); int quantity; quantity = Car.collection.elementAt(i).carInventory; if (quantity …

Member Avatar for stultuske
0
95
Member Avatar for nucleareactr

Hey all, In computer class as homework we're to create a code to find prime numbers between two values m and n without using an array (since we havn't learned about how to use them yet). so far the code I have is: [code] public static void prime (int m, …

Member Avatar for Ezzaral
0
987
Member Avatar for -_-

how can i write a email function using jsp which have reply, forward, address book function like yahoo email function.

Member Avatar for jwenting
0
62
Member Avatar for Clawsy

Hello, I have a script written in Java that gets me an answer from a script containing a number of files. The problem is I don't know how to code this in javaFX script as I am very new to it. [CODE] URL url = new URL(page); URLConnection conn = …

0
140
Member Avatar for anders10

Hi! I want to put up a network with a server and a client. The game shall be implemented in the server. The tictactoe game itself works fine.And I've just started to implement it as you can see from the code. There is supposed to be two players i e …

Member Avatar for BestJewSinceJC
0
143
Member Avatar for JuneM

I am trying to compile this java file and it is giving me an error say : java.lang.nosuchmethodeorror.main what could be the problem? [code=c] import javax.swing.*; import java.awt.*; import java.awt.event.*; public class JChangeFont extends JApplet implements ActionListener { JLabel banner = new JLabel("Your Name"); int fontSize = 18; Font theFont …

Member Avatar for sincerelibran
0
216
Member Avatar for babylonlion

Hi there, All i want to do is read the jokes from a text file (using Scanner) and then write them out to three different files with three different extensions (fileName1.obj, fileName2.dat, fileName3.txt), that's part A. Part B, Create a class called FileWatcher. • This class can be given several …

Member Avatar for BestJewSinceJC
0
146
Member Avatar for laelzio.mosca

I`m trying to write a sample program in java, but the book doesn`t explain how I should write my html code to execute it, I don`t even know what I should use to write a HTML code, I looked online, but didn`t find much. this is the java code: [CODE]import …

Member Avatar for sincerelibran
0
86
Member Avatar for chern4ever

issit possible to let java obtain the path that store the specific .java file?

Member Avatar for chern4ever
0
73
Member Avatar for JuneM

I am trying to compile my java file here but I am getting 8 erros with the same sybmol : illegal start of an expression here is my coding: import javax.swing.*; import java.awt.*; import java.awt.event.*; public class JChangeFont extends JApplet implements ActionListener { JLabel banner = new JLabel("Your Name"); int …

Member Avatar for sincerelibran
0
405
Member Avatar for jresh_101

\n is within a string... String str = request.getParameter("textfieldvalue"); I want to display the value of str to other pages..using this link below. window.open("page.jsp?param=<%=str%>") ....the problem is that the window is not opening due the str has \n. How to read \n in a string?

Member Avatar for toughlittleone
0
215
Member Avatar for mjwoodford

Hi, I have a jsp, the relevant piece as follows: [code]<%@ page language="java" contentType="text/html;charset=utf-8"%> <%@ page session="false" %> <%@ taglib uri="/WEB-INF/tld/portlet.tld" prefix="portletAPI" %> <portletAPI:init /><% String welcomeImage=portletResponse.encodeURL("/images/welcome_image.jpg"); %> <div id="welcome_img_div" style="margin-left:5px;width:715px;height:190px;background-image:url('<%=welcomeImage%>');background-repeat:no-repeat;">[/code] I want to rotate around a series of images as the 'background-image' ..but it is not clear to me …

Member Avatar for ejosiah
0
102
Member Avatar for vinothkumarrvk

Friends i have one doubt: Who invented the [B]spring framework [/B]and when they invented it? Please help me to know this.

Member Avatar for vinothkumarrvk
-1
66
Member Avatar for shivnath

Hi all, I am doing a project work and I need to take the image(just as screenshot) of the first page of any file so that contents of that first page can be viewed by that image . And finally i want to set that image as an icon for …

0
59
Member Avatar for nonexcep

Hi there. I'm learning Java and this is a sample applet in which I try some basic drawing operations. I hit some roadblocks and I'm hoping someone can point me in the right direction. What I want to do here basically is make a rectangle with exactly 10 pixels of …

Member Avatar for gangsta1903
0
106
Member Avatar for rjsud85

how to run the javabean program.... where will be stored in bdk tools folder..... how to create the manifest file and jar file... where will save manifest & jar files in java... please give the information how to working the program.... please send the information in step wise. we are …

Member Avatar for kvprajapati
0
87
Member Avatar for purijatin

hello!When in the below code if iam using a local address instead of yahoo.com,it is executing well,but if iam not using a local address then it is giving a java.net.SocketException.I use a proxy connection and i have set my proxy for java .pl help [CODE]import java.net.*; import java.io.*; import java.io.*; …

0
52
Member Avatar for Mandarinire

Hi guys, Can you help me out with this project. My head is fried with this now. I am getting confused when you have to call on functions outside the class and variables from outside the class. What i need to get done is the following: a. Add a close …

Member Avatar for javaAddict
0
2K
Member Avatar for aroranid

I want to have locale wise 301 redirect on my page, as if if the user browser locale language is set to en_CA then it will be [url]http://www.xyz[/url].[B]ca[/B] domain and if the locale is en_US then we will put a 301 redirect to [url]http://http://www.xyz[/url].[B]com[/B] site. Similarly if the browser locale …

Member Avatar for aroranid
0
47
Member Avatar for don_donnay

I have an exam tomorrow and this is a practice program, I am very lost could some body help me please Moving Hero The hero in this scenario should move "forward" whenever act is called. Note that Hero is a subclass of Actor, so there is no move method defined, …

0
86
Member Avatar for PhiberOptik

Hey guys I am playing around with tiled (tileset mapping system) it outputs the maps in an xml style format the core data of where the image pieces go in base64 gzip. [CODE=xml] <data encoding="base64" compression="gzip"> H4sIAAAAAAAAAO3DAQ0AAAwCIHuY4v3LGeSw0UuqqqpPDh0GsvgACwAA </data>[/CODE] I'm not sure where to go to unzip this string, I have …

0
65
Member Avatar for saveyourselves

I am so confused in how to go about starting this, I have the information i need to input into the program but seeing the structure on how the program is laid out is my problem. Any example would be of great help. 1. Sandwich class to simulate the sandwich …

Member Avatar for kvass
1
217

The End.