32,199 Topics
| |
Hello guys im working on program and i stucked at database i need to create some place that will save all information of Account (in some file if can) then read it every time user "Log in" in the program. I tryed searching but i cant get it ... Please … | |
hi all, I need to draw a series (10) concentric circles starting fromt he middle of the panel. This is what I have done, do you reckon it is ok? //Ovals.java import java.awt.Graphics; import javax.swing.JPanel; public class Ovals extends JPanel{ public void paintCmponent(Graphics g){ super.paintComponent(g); //calculates the centre of the … | |
import java.io.*; class pattern { public static void main(String args[]) throws IOException { int n; BufferedReader br = new BufferedReader(InputStreamReader(System.in())); System.out.println("Please Enter Your Pattern Length:- "); n = Integer.parseInt(br.readLine()); while(n>2) { for(int i=0;i<=n;i++) { if((i==1)||(i==n)) { for(int k=0;k<=n;k++){ System.out.print("*"); System.out.println(); } } else { int o = n-2; System.out.print("*"); for(int … | |
Hi everyone, I'm using the following code snippet to download and save a file from an address using Java... URL website = new URL("http://www.website.com/example.torrent"); ReadableByteChannel rbc = Channels.newChannel(website.openStream()); FileOutputStream fos = new FileOutputStream("example.torrent"); fos.getChannel().transferFrom(rbc, 0, 1 << 24); However, a problem occurs when I try to download a file with … | |
? missing return statement! hi guys, Im trying to compile this class below, but its just not working, it keeps sating 'missing return statement' int the method declaration line. Can u see to check if there is anything missing in my code or if iv done something wrong?? Thanks! [code]public … | |
can anyone plese tell me how to make installable file of a java program using visual studio 2010 professional.? | |
how to call different java method based on html select option choice? any code sample? basically, user will select a dropdown option and press submit. for each option,different query should be executed. using mysql DB and netbeans IDE. Thanks !!! | |
Two different questions 6) write an application that displays the result of dividing two numbers and displays any remainder.the main () method prompts the user for values and sends them to the dividing method; the dividing method the calculation and displays the results. 8) Write an application that cal calculates … | |
hi guy i would like help or info about socket little exemple of code: clientSocket = new Socket(ip, 6784); BufferedReader insideServer = new BufferedReader( new InputStreamReader(clientSocket.getInputStream())); its that possible from the inputStream getting the click event ? example a user click from a button and another user using same application … | |
I having been working on java web-start applet for serial communication which I now need to integrate and make it invoke able from an ASP .NET webpage / application. I have tried numerous ways of doing this which all have not yielded anything progressive. including but not limited to the … | |
how to update databse in remote machine,i am having .sql file which i have to update my database schema in remote machine,client will provide me his machine ip address,database username,database password,database instance name...pls help me pls package com.prion.testConnectivity; import java.io.BufferedReader; import java.io.FileReader; import java.io.Reader; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; … | |
where can i get help on programming an SMS server center in java. I also need to know if it is applicable in Second Generation Technology. If there is anyone who knows how these things run please advise me. Urgent | |
I'm somewhat new to Java and programming in general and I am receiving this error when I run my program and I have zero idea as to what is causing it. Thanks in advance. [CODE]public class AssignmentEight { static final String INFILE_NAME = "ass8_input.txt"; /** * @param args */ public … | |
hello friends .this code have error-ARRAY OUT OF BOUND BUT I AM UANBLE TO FIND WHERE IS IT AND HOW TO REMOVE IT.. PLEASE GIV ME SOLUTION AS SOON AS POSSIBE. //import java.util.Scanner; import java.lang.System; class PascalTri { //public static void main(String[] args) { // TODO Auto-generated method stub //Scanner … | |
Hello Im currently creating BMPs as a bufferedimage as following: BufferedImage bufferedImage = new BufferedImage(320, 320, BufferedImage.TYPE_INT_RGB); Thing is that black and white is more than enough for me so would I do this: BufferedImage bufferedImage = new BufferedImage(320, 320, BufferedImage.TYPE_BYTE_BINARY); ? Thanks | |
class Temp { static int []years={-80000,-79950,20,70,22,60,58,60,58,65,1950,2005}; public static int max_year(int x,int y) { int i=0; int j=0; int m=0; int n=0; int z=0; while(x<y) { z=(x+y)/2; for(i=0;i<=11;i=i+2) { if((years[i]<z) && (years[i+1]>x)) { m=m+1; } if((years[i]<y) && (years[i+1]>z)) { n=n+1; } } if(m>n) { y=z; } else { x=z; } } … | |
how can i convert int to char or string now les say: i want to convert int to char ex: int a = 3 char b = '3' note they both are same number or int to String int a = 35; String c = "35"; note i already tried … | |
I have been working on this assignment for a while now and I can't figure this one issue out. I was given four files, Name.java, SortableArrayList.java, NameListDriver.java, and SortableArrayListWithBubbleSort.java. The program is meant to take a text file with a list of names and sort them alphabetically. Part one of … | |
class Temp22 { static int []years={-80000,-79950,20,70,22,60,58,60,58,65,1950,2005}; public static int[] findMaxdinosaur(int[] years) { int[] count = new int[(years.length)/2]; int i=0; int j=0; int k=0; for(i=0;i<years.length;i=i+2) { int m=0; { for(j=0;j<years.length;j=j+2) { if(years[i]>years[j+2]) { m=m+1; } } } { count[k]=m; k=k+1; } } return count; } public static void main(String...s) { int[] … | |
Hello, I'm trying to fill a shape using TexturePaint in java. However when i'm running the codes i'm having the following errors: Exception in thread "main" java.lang.Error: Unresolved compilation problems: ImageIO cannot be resolved IOException cannot be resolved to a type at Textures. import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Rectangle; import … | |
How to solve java.lang.NoSuchMethodError: main Exception in thread "main" when i run it produce Exception in thread "main" java.lang.NoSuchMethodError:main this is coding import java.awt.; import java.applet.; public class Sepah extends Applet{ public void paint(Graphics g){ g.setColor(Color.green); g.drawLine(100,100,10,140); g.drawLine(100,100,150,120); g.drawLine(290,120,400,130); g.drawLine(410,130,500,100); g.setColor(Color.black); g.drawLine(150,80,220,40); g.drawLine(220,40,290,80); g.setColor(Color.yellow); g.fillRect(150,80,140,140); g.setColor(Color.orange); g.fillRect(170,110,40,40); g.setColor(Color.orange); g.fillRect(230,110,40,40); g.setColor(Color.black); … | |
Hey guys!!! Just found this wonderful forum.....Thanks for the guys who run this forum.. I am an Elec. & Telecom engineer... I understand Java Programming & I have more than 90% of the concepts of core-java and good knowledge of jsp,servlets,struts....I have some basic knowledge of oracle.... I have a … | |
**Hi forum, I've got a question for the pros. I am making a program that has map<String, String> map = new TreeMap<String, String>(); and a Scanner to read a file contains some data which is assigned to map.put(); method. The data is something like this: UK USA Canada Australia etc. … | |
I am trying to read in from a .dat file, which includes a list of names a line of asterisks and a list of numbers, JUST the names in the file into nodes to be used in a linked list. All of the names will be before the line of … | |
Hi folks. I am trying to learn J2EE and I am looking for a complete J2EE tutorials online. Plz suggest me some links where i can learn the J2EE completely(if not 100%, atleast 90%) . It will be pleasure if the tutorials are FREE as i cant afford to pay … | |
hi I'm working on my hw and I have problem I know how to read file from data and split each line using array now I want to use arrayList .. I want to read the data from the file and create arrayList and then split each line and create … | |
hi I'm working on my hw and I have problem I know how to read file from data and split each line using array now I want to use arrayList .. I want to read the data from the file and create arrayList and then split each line and create … | |
Hi I'm trying to locate some java that will allow a preview images, and float large display on roll over. The setup will be a list of customers and a small thumbnail. On rollover a large image centre screen on top with a text description below. Mouse out will clear … | |
Hi All, I have two major problems and they may or may not be linked. My main problem is with an application that I am creating. So far, I have only created the GUI using Netbeans 6.8. When I run the app through Netbeans then everything works fine. However, when … | |
Hello, This is what I'm doing: 1. Get an image from a source 2. Get mouse position 3. Put a mouse Image on original image 4. Resave The code to get the image is working and saving it the "first" time But the code after that seems to not work … |
The End.