- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
60 Posted Topics
is there a function for: ex1: String = "2+2.3/34" output: double = 34.0 ex2: String = "45/4+3-0.4" output: double = 0.4 so, find the last operator and take the next number into double. note there are no spaces. | |
hey, can some one help me with two things? first getting a error on "Animation animationObj" error:Animation cannot be resolved to a type 2nd i am trying to make a templet for making android games. this is what i have so far. two classes. one does the animation and other … | |
i am making a calculator in swing and need help with some logic. so some of button my cal will have: 0,1,2,3,4,5,6,7,8,9,dot, mult,divide,mod, equal,sqrt, ln,log,sin,cos,tan, ^, exp, fractor, etc...... bc i have alot of buttons i need a good way to compute them. here what i am thinking: first user … | |
error: No resource identifier found for attribute 'entriesValues' in package 'android' line: <ListPreference error: Error: No resource found that matches the given name (at 'entries' with value '@strings/list'). line: anroid:entries="@strings/list" error: Error: No resource found that matches the given name (at 'entriesValues' with value '@strings/lValues') line: android:entriesValues="@strings/lValues" res > xml … | |
I am considering going to android bootCamp "deltaprogram.us" or "www.codercamps.com" in texas. These are the only two good android camps i could find. Problem is that i cant seem to find any review about them. Let me know if any of you went there in past or you guys know … | |
my r.java file in android is not updating. i already tried: 1 - clean project 2 - refresh / restart eclipse/computer 3 - all my string are in double quotes | |
trying to create menu in android but having a error. i am 98% sure my code is right. can some one take a look and let me know if there is a problem they see. res > menu > main.xml <menu xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="@+id/action_settings" android:orderInCategory="100" android:showAsAction="never" android:title="@string/action_settings"/> <item android:id="@+id/newGame" … ![]() | |
I am trying to create android project in eclipse, for some reason it doesnt create gen > R.java file. I did clean project and doesnt work. any ideas? | |
i want to learn about robotic and i have no idea where to start. problem is that my college dont have any robotic class. so i have to learn every thing on my own. goal is to build and program a robot. should i start learning about hardware or software? … | |
need help with design to separate model and gui code? les say i have 3 classes. Main.java BoxGui.java BoxModel.java public classBoxModel { BoxGui bg = new BoxGui(); public void moveBox(){ int x = bg.getX(); bg.setX(x+1); } } public class BoxGui { int x,y,width,height; public void paint(Graphics g){ g.drawRect(x, y, width, … | |
does any knows how to set a delay in japple - timmer? before running test method i want to set one sec dalay. public void test() { //some code here } i tried this but didnt work. public void test() { int i = 10000; while(i >= 0){ i--; } … | |
error on lines: setContentView(R.layout.activity_main); getMenuInflater().inflate(R.menu.activity_main, menu); error: ----- R cannot be resolved to a variable package com.example.android_01; import android.os.Bundle; import android.app.Activity; import android.view.Menu; import android.widget.EditText; public class MainActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.activity_main, menu); return true; … | |
i can some one help me with jframe and panel. i want to create button using jpanel. i look online but they seem to have different ways to do it and i have no idea which is the best way to do this. ex some people extends jframe at top. … | |
trying to write 2d snake game in java just for fun. i have tile map as 2d array. the problem is that its is not drawing player in level 2d loop. let me know if there is better way to do this. only thing i have to use 2d array … | |
les say i want collision between two rect than i cant set up bounds on both rect: public Rectangle getBounds(){ return new Rectangle(x, y, width, height); } than to check for the collision i can do this: if(rectOne.getBounds().intersects(rectTwo.getBounds()) { ...} **now les say what if i want 2d array:** 0, … | |
i want to use JavaFunctions.java into login.jsp file. my plan is to store all my java functions in one file and i can use them later. ex check for string or number etc functions... first my folder tree. webside_01 >.settings >build >src >newServlet JavaFunctions.java website_01_Servlet.java >WebContent >META-INF >WEB-INF index.jsp login.jsp … | |
i want to learn jsp and best way for me to this by create a website durring this sumemr. i dont want to create website there are already out there ex social networking site, eCommerce etc... need some idea | |
I am trying to create breakout game like this below. http://www.2dplay.com/break-out/break-out-play.htm I like how when balls bounces on paddle you have control over where it is goings. i need help creating some thing like this //this is my code for when ball touch the paddle(player). i have divide the paddle … | |
i have a enemy and spriteanimation classes. in Enemy class i have bufferedimage array with 4 different images. than i am creating a animation and storing in 'animationEnemyHit' variable. than i am starting and updateing the animation in method. the problem is that it keeps on loop for ever. i … | |
i am using xammp database. and i want to get last ID from my database so that i can insert new stuff in it. the code below doesnt get me the last it. its prints it is adding one next to last it. ex 7, 71, 711, 7111, 71111, but … | |
Re: you make website with it, its kind of like php. Just search "jsp" in google. | |
I am making a string array so user can type whatever they want. the problem the code i have below user can enter &, alt, up, @, in string array. I want user to enter letters and numbers only, and 1st char has to be letter. I couldnt find any … | |
i have two classes. Main class and tester class. I have to create a textfield so your can enter there name. The problem is that in tester class i am getting error on add() method. is there simple fix for this? i want to create the textfield in tester class … | |
i am trying to make a breakout game where you have a paddle and ball bounces around breaking bricks. the problem is that if ball touches the corner of player(cyan paddle). than it goes inside of player. i could not understand why. only thing it might be bc of all … | |
i am trying to put a java japplet on website. when i run in eclipse it works fine but when i run on website then i get a error: error: on website CacheEntry[http://localhost/eCommerce/menu_pages/game_pages/java_game_3/Main.class]: updateAvailable=true,lastModified=Fri Apr 26 20:39:42 EDT 2013,length=10508 CacheEntry[http://localhost/eCommerce/menu_pages/game_pages/java_game_3/Main$Display.class]: updateAvailable=true,lastModified=Fri Apr 26 20:39:42 EDT 2013,length=2489 Exception in thread "AWT-EventQueue-2" … | |
making a scrolling background. There is one problems with this code below. I am drawing a image and it stay there on left of screen. i want to del it and create new one so there aren't 100's of background images on left. i just want to keep 2 background … | |
i just finished one game in java using JApplet. is there a way for me to use a database so i can keep track of scores? I am using xampp control apache for my website database to keep track of username etc.... in php. Can i connect to it using … | |
i am drawing two rect in paint method. 1st rect i want to rotate it but 2nd rect i dont want to rotate it. the code i have should rotate only 1st rect but the problem is that when it rotate it missup the x, y postion of rect. this … | |
i have asteroids store in arraylist. i want to check collision between player and asteroids. if player get hit than i want to minus one life and move the asteroid backwards so it look like it bounced in to player. right now this code is check for collision between player … | |
![]() | |
in enemy bullet class i am creating two different kind of bullets. 'animationFire' and animationFire2. Enemy Bullet class public void paint(Graphics g) { g.drawImage(animationFire.getSprite(), (int)(x),(int)(y), width, height, null); g.drawImage(animationFire2.getSprite(), (int)(x),(int)(y-30), width, height, null); g.drawImage(animationFire2.getSprite(), (int)(x),(int)(y+35), width, height, null); } In Enemy Class i am shooting the bullets. i am doing … | |
i am tring to debug this problem for about a week but had no luck in it.  Take a look at this image above. This is how i want the bullets to look like. shoot red lines.  Now take a look at this image above. I … | |
note player is a space ship. in player class i have set up collision so that player cant go above window and below. player class public void playerWCollision() { if(y < 0) { y = 0; } else if(y+height > Main.WINDOW_HEIGHT) { y = Main.WINDOW_HEIGHT-height; } } lets say player … | |
if i hit sumbit i get output at bottom. but if i check again than i get a error. bc number1 is null. i was thinking to have about if statment inside if statment, to text if int field is null or not. <html> <body> <!-- directive tag --> <%! … | |
so i have two animation. one is when player is standing and one is when player get hit. 'standing' animation will keep looping for ever. and 'planehit' animation should loop though onces and stop. in player class iam setting up animation by getting images. 'standing' animation has two images. 'planehit' … | |
i have a class enemyboss and sending it to different class called levelObject. main.java EnemyBoss enemyObject; ... //game loop - actionperformed levelObject.nextLevel(enemyObject); ... //paint method if(enemyObject!=null){ enemyObject.paint(g); } in level.java class i am createding enemyobject class. level.java ... enemyObject = new EnemyBoss(50, 20); ... the problem is nothing prints on … | |
i just say some using "this." in setter, getter and constructor method. i have never done this so is this good prative to use "this" in getter or setter. ex: public test(int ix) { this.x = ix; } or public int getX() { return this.x; } | |
i want to create 2 items on screen. each item will be different color rect. item1 = green rect item2 = blue rect if user get the 1st item. than it will print bullet1 1st image. if user get the 2nd item. than it will print bullet2 2nd image. bullet1 … | |
can some one tell me the different between them? my understanding jsp = like php ee = no idea j2ee = next version of ee? asp = uses javascript .net = no idea | |
lets say i have a array. how many different way can i look up a value. for ex one way would be use forloop and go though every element untill u find your value. 2nd way is binary search. are there more? if so can you let me know the … | |
i have a Life class. which just prints a image of heart. i want to have 6 lifes so iam adding 6 classes in arraylist. 1st heart one left. 2nd heart next to it..... int life = 6; //LIFE - create 6 heats and store in arraylist lifeClass = new … | |
i making a game. i have a player and i want him to shoot different kind of bullets. i already have created my player class and bullet1 class. i am think of making bullet2 class, and bullet3 class. than i can make a variable. main start with like this: String … | |
i have two classes, enemy class and level class. in level class i am changing the counter value. note i set up my if statment so it will only goes in onces and never again. so if u reach lvl 2 than it will go in lvl2 if statment onces … | |
how hard is to learn object-c, if you know java. i want to build online games in java and build apps in object-c. i want to switch between them fast. can you give some idea how same or different are those language are? | |
i had a question on resume. i am tring to get a internship as java programemr. i have created some basic games using java/oop such as pong, breackout, and spaceship fighter. should i put them in my resume? or those games are way too basic and i shouldn't put them … | |
i have a for loop and inside i have some code. i want to run this code random. i was thinking of using a if statment. for(int i = 0; i < 50; i++) { if(ran.nextInt(50) > 50/2){ //code } } but i want it so its even more random. … | |
i have enemy class. and i am createing bunch of them and storing them in arraylist. i am printing them in random places. for(...){ enemy_class = new Enemy((WINDOW_WIDTH/2)+r.nextInt(WINDOW_WIDTH/2), r.nextInt(WINDOW_HEIGHT)); //add in arraylist } the problem is that some times they get create on top of each other. so my plan … | |
Re: if u want to create website in java. than look in to jsp if u want to create appltion and put it website. than look in to japplets | |
i need some help with binary trees. i belive i have finish with insert and displaying the tree methods. but i can not be sure but i am getting a error in main. error in main: Exception in thread "main" java.lang.Error: Unresolved compilation problem: Cannot make a static reference to … | |
i have no insert method and still its adding node in linkedlist. code below have no error so you can run to see the problem better. if u run this it will ask u to enter a command. i only have two commands exit and display. display command will print … |
The End.