35,618 Topics
![]() | |
heres's my code : [CODE]/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package javaapplication11; import java.awt.*; import java.awt.event.*; import javax.swing.*; /** * * @author Jayson Jude */ public class JavaApplication11 implements ActionListener { private JFrame window = new JFrame("Tic-Tac-Toe"); … | |
So I am supposed to write a class that converts fahrenheit to celsius (& vice versa), calculates the volume of a sphere after a radius is entered, and calculates the hypotenuse of a right triangle, all using nothing but static methods. Here is what I have so far; [CODE]class Fun … | |
can you urgently suggest codes for me its proxy cache/ http request and response plz | |
Hi all, I am doing my second year undergraduate and I have a new project which is due in 10 days. I wanted to create an Online Bookstore project using JSP. *** I haven't used JSP before and also I wanted it to run in Linux system. So everything is … | |
[CODE] import java.io.*; public class CheckersGame { public static void main (String []args) throws IOException { BufferedReader jill = new BufferedReader (new InputStreamReader (System.in)); System.out.print("Enter name of the first to move: "); String name = jill.readLine(); System.out.print("Enter name of " + name + "'s opponent: "); String opo = jill.readLine(); … | |
So the prelab for my CSE class asks Your assignment in version 1 is to write a Java program that lets you select six lottery numbers. For this version, you can accept any six values including duplicates. Your program must have the following elements: - Create a class named Lottery1 … | |
hello all I found the sample code ,but do not understand how the author found the value of width and height in the frame,anyone can tell me ? frame.setSize(120, 285); According to my count the value must be : frame.setSize(110,250); thank you denny [code]import javax.swing.*; import java.awt.Color; public class Traffic_Lights{ … | |
Hi there, I have a dynamic programming problem and I have NO idea where to start. You are given an input of integers and mathematical expressions. For example, you are given: 5 + 3 * 2. The program processes this input. It ignores the BEDMAS rules, and returns the highest … | |
Holler fellow programmers I have an error that's been bugging me for almost a day now: I keep getting 14 of this error: class, interface, or enum expected Yes, 14 different exact same error message basically for every line of code in the inputGetter method below. Can someone please help... … | |
Hello forum: I have to set the position of 4 labels, though in this example I'm only starting with one. for some reason even though I do setLocation(40,50) it is not working. Any ideas? The code of the small part ; If you guys want the entire program Ill post … | |
Hi, I'm using JasperReports in netbeans, on Ubuntu. When I execute my java application on netbeans I have no problem saving the reports, but when I clean and build the program, and run it from the .jar, the program can't save the reports. I don't know if that's because of … | |
I need to write a program transfer huge amount of files(60 GB) from my application server running on hp-unix to a remote PC . I haven't worked in hp-unix before. 1.Is it possible to run a sshd server using some shell command in hp unix and connect to the sshd … | |
I want to know how to read a file in Java and then store the file contents into a String object...like String[] content= file contents?? here's the code of reading a file and i want the contents to be stored in a string variable... [CODE]public static void main(String[] args) throws … | |
hi i am work on my graduation project in java using borland jbulider 7 and windows 7 but now when i run the program it doesnot work correctly the component need so many time to apper i will be thankful for any help thanks | |
hello friends i am new to ejb and i tried to create a session bean for obtaining JDBC Connection,and i called it from a servlet the session bean was a remote session bean but connection is not getting established.. EJB CODE : ConnectionBean.java [CODE] package com.ejb; import java.sql.Connection; import java.sql.DriverManager; … | |
Hi guys. I am getting the error: LoanProgram.java:17: variable payment might not have been initialized payment = getPayment (amount, rate, years, months, payment); I am stumped, and the lab is due tomorrow. If anyone could help me out I would greatly appreciate it. :) I'll put an asterisk on the … | |
can anyone tell me how to extract bmp picture frames from a a video file..... and also the reverse process i.e bmp files back to video files...... when i googled i got several stuffs regarding extraction of image files from video file using c#, is there any method in java..... | |
i want to make a menubar similar to that of MS OFfice. I have downloaded some Executable JAR files that tells me they can help me, but as I run the codes, nothing happens. Can you please teach me how make a ribbon menu bar.? or give me a link … | |
Hi, I was preparing for SCJP 1.6 and i have the following snippet of code. [CODE]package com.self.trials3; public class Animal { public void Animal(){ System.out.println("Obviously Works"); } Animal(){ //System.out.println("Constructor"); //super();use super or this() as first line in your cons to call other //cons. this("Adarsh"); } Animal(String AnimalName){ //System.out.println("AnimalName >> "+ … | |
Hi!(: Sorry, I'm totally new and have no real idea about what I'm supposed to tell you. I just really need some help on my java homework so anything would be much appreciated. (: I feel like I'm already asking for so much.. so I'm really sorry, but can someone … | |
i have a game that i made [url]www.thenewedinburg.com/obstacles.html[/url] at the end i would like to ask the user to input his name and that name to be saved in a .txt file that is stored in the webpage like for example [url]www.thenewedinburg.com/savename.txt[/url] so that any user that plays and gets … | |
I realize this will very likely be a short thread, but it is a question that has been eating at me for a while. I have just started taking a Java class (basic introduction) and so far I am loving it. Primarily I am a web programmer, so the only … | |
I'm having a severe brain drain moment and can't figure out how to validate user input? I need to make sure that it is an int and it is greater than 2. And I need it to loop until the user meets those requirements. I tried a try-catch block but … | |
Hey guys, I'm working on an entry level java programming assignment and I'm running into some trouble. I've attached 3 java files and will quote the problem below. If anyone can point me into the right direction I would really appreciate it. Thanks! I'm fairly sure the code needs to … | |
I am working on part five of the Farmers Market program and am ready to pull my hair out. Not getting much help from the instructor either. here is the code [code] /* * To change this template, choose Tools | Templates * and open the template in the editor. … | |
can anyone tell me how to read and edit video or image file properties through java | |
I keep getting a stackOverflow error in my quickSort and I can not figure out why. Any help would be greatly appreciated!! [CODE] private static void quickSortRecPriv(int[] arr, int first, int last, int ps) { int pivot = arr[first]; int left = first; int right = last; if (arr == … | |
Design a cashier change maker that will take as input: a floating point value. Value: "change due" and will convert it to proper currency (from $20 down to pennies) amounts to be handed as change to the customer i am not sure how to use the rounding correctly every time … | |
I am trying out something new and I am wondering if this is valid and is not working because of some other code glitch. Graphics class: [CODE]import java.awt.*; import javax.swing.JPanel; public class Drawing extends JPanel{ KeyCommands kc = new KeyCommands (); public void startGraphics (){ System.out.println ("Adding KeyListener"); addKeyListener (kc); … | |
i have code like this in page1.jsp <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <html xmlns="http://www.w3.org/1999/xhtml"> <body> <h1>Test</h1> <script language="javascript"> function JSGetSelectedItem() { var dropdownIndex = document.getElementById('lang').selectedIndex; var dropdownValue = document.getElementById('lang')[dropdownIndex].text; alert("Hello JSCript " + dropdownValue); } </script> <!-- to fill combobox i had get from … |
The End.