35,618 Topics
![]() | |
note i am working on eclipse, java, xml and anroid. i have a activity_right_sub_menu.xml file <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="@+id/I_ABOUT" android:title="About Us" android:numericShortcut="1" android:alphabticShortcut="a" android:orderInCategory="100" android:showAsAction="never"/> <item android:id="@+id/I_PREFERENCE" android:title="Preferences" android:numericShortcut="2" android:alphabticShortcut="b" android:orderInCategory="100" android:showAsAction="never" /> </menu> than i have a Menu.java file public class Menu extends ListActivity { … | |
I am trying to input an int into the end of a singly linked list. I have already created the code to put a number at the end of the list but when I go to print it out, it only prints out (in my test class) the int that … | |
import javax.swing.* ; import java.awt.event.*; import java.awt.*; import java.io.*; import java.util.Calendar; import java.util.*; import java.text.*; import java.util.Date; /* <applet code="gui.class" width=250 height=100> </applet> */ public class gui1 extends JApplet implements ActionListener { JTextField t1,t2,t3,t4,t5; JLabel l1,l2,l3,l4,l5,l6; JButton b1,b2; Calendar c1,c2,c3; JPanel p,p1,p2; Date sd,sd1; SimpleDateFormat sdf; public void init() { … | |
Hi can someone help me with this question please? 1. In "setup" Create an array of 1000 random integers between 0 and 100. Also, in "setup" declare an array of bins or counters to find out how many integers fall into one of the 10 "bins" 0-9, 10-19, 20 -29, … | |
Hi all, I'm about to get a little long winded here and I'm sorry for that but I have a couple of issues that I need guidance with. I have assembled a procedure that basically performs a bunch of web browser clicks to query Statistics Canada (SC). The query itself … | |
Hello, My son is taking a java course in Hawaii. His text book is "Java Solutions by Lewis & Loftus 6th edition. He copied several text book examples and tried to compile them with JCreator and NetBeans 6.8, each compiler gave pages of errors. The question is " What is … | |
Ok cant seem to find the null pointer exception error on my code one moment its working fine the next when i add the 20 i get an error, and i dont know if this is what messing my find method. Between my tree is supposed to be a binary … | |
Hi, I'm developing an APP for android which requires a database, i'm using mySQL, but haven't had any luck with it's connection, this is my code: connection class: public class MySQLConnect extends Activity{ public void onCreate(Bundle savedInstanceState) { } public static void connection(String[] args ) throws Exception{ Class.forName("com.mysql.jdbc.Driver"); Connection con=(Connection) … | |
I have developed a application in java that connects to facebook on the basis of access token. I can produce access token manually by feeding in urls in browser. But I need something that automatically give me an access token. I am getting no idea, whether I can do it … | |
hi guys. can u please help me in my project? code for a java program that accepts input number and displays the largest among the individual digits of that input. The sample output is here. Input Number: 123456789 Largest Digit: 9 We cant still use arrays guys because we didnt … | |
public class Calculate { Calculate() { int x,y,sum, multiply,devide; x=12; y=5; sum=x+y; multiply=x*y; devide=x/y; } public static void main(String[] args) { System.out.println("the sum of two numbers:" + sum); System.out.println("the multiple of two numbers:" + multiply); System.out.println("the devition of two numbers:" + divide); } } | |
I started programming courses 4 months ago and I can't solve this problem according to it's required order . I need your help as soon as possible and I think it is easy for you :D thank's in advanced :) a) Given an unsorted array of integers, your task is … | |
Hi guys, i am trying to add a image as the background for my project but cant get my code right, heres what I got so far //beginning of 1 import java.awt.Graphics2D; import java.awt.Toolkit; import java.awt.image.BufferedImage; import javax.swing.JPanel; /** */ public class makeB extends JPanel { private BufferedImage buffer; private … | |
My assignment is to randomly generate a password based on the selection chosen by the user. So far, my code is unfinished but that's because I've run into a problem. For the second selection(Lowercase and uppercase letters). My password will display lowercase and uppercase letters but it won't be enough … | |
I need to create a palindrome tester program that ignores spaces, punctuation and uppercase/lowercase to determine if the string given to the user is a palindrome (same beginning to end as end to beginning). HERE'S WHAT I HAVE SO FAR: String str, another = "y"; int left, right; Scanner scan … | |
i'm having a hard time creating a program that will display the initials of a string provided by the user. The program should also display the number of words of a given string. i've tried this code, but the problem is, the program would only display the first initial and … | |
cause of erorr enum,interface,class expected?give suggestions | |
Hi, I was not able to see a spring section. I saw some posts here related to spring, so i am posting it here. I have a requirement. I am working with Java-Spring MVC 3.0 framework. And i am working with form tags too in my JSP. I have the … | |
Hello! This is my first post, I'm new to java and I found when I search for things this site often shows itself on google results so why not join? Anyways I'm creating a text editor in java and I want to find out how to in for example windows … | |
Hi guys i am new here i want to help about: how to convert digit(number) into word for example: Enter a number:123 Output:one hundred twenty-three | |
first buid array with images's --90 images PImage pic[]; void setup() { size(900,900); pic = new PImage[90]; for(int i = 0; i < 90; i++) { pic[i] = loadImage("section_"+i+".jpg"); } frameRate(0.5); smooth(); } than prnt image on screen int i = 0; int counter = 0; int flag = 0; … | |
hi, so i coded a projectile motion java applet, not only with this but with many other programs i get problems which seem to me to be a memory issue. But the first time lets say I shoot hte projectile it will not show the screen until it has landed … | |
I have to do a program dealing with 2 bank accounts. I must have a balance and a number of transactions. It also has to deal with draining a customers account and transfering the amount into the account that called the method. I have the rest of the code written … | |
Basically part of my project was to take the rows of pixels from a picture and make each row display twice, and the same for the column, and then eventually do them both together. However, I am having trouble with my loop to duplicate the rows or column. What I … | |
Ok so this is my task: Description: Create a generic class called GenBinTree. GenBinTree will use nodes that store a value of the generic type to store its contents. This tree will not be a search tree (no ordering of nodes by value). What ges me its the the part … | |
Hey there, I've got a small problem. I'm writing an UDP client-server system, and I wanted to use streams with UDP. I found [UDPOutputStream](http://www.java2s.com/Code/Java/Network-Protocol/UDPOutputStream.htm) source and pasted it into my project. Now, when I try to initialize it, it freezes. This is how I try to initialize it: outStream = … | |
Hello I'm tring to creat a specific Look in my Java JUI but my code is giving me errors when I try and launch it. Here is my code please take a look and tell me where i'm going wrong. Its a simple login interface for my program: import java.awt.*; … | |
Hi! I'm trying to create a method for simultaneous dragging a group of JLabel components. First, I select the components to be dragged ([ICODE]getSelectedStatus() -> true[/ICODE]), and then I want to be able to drag the selected components. I have a working method for a single JLabel component, but there … | |
I am looking for your opinions on the best site or book in order to learn java. I am currently in school for C.S. learning C and would like to expand my knowledge. Thank you in advance. | |
Hi, I'm using IReports to generate reports to my netbeans project. The reports which dosen't contain a chart, runs in the run time(Netbeans) and execute well. but when i add a bar chart to the report it gives the following exception even though the bar chart report successfully compile and … |
The End.