Questions tagged as 'java'

1
answer

Rotation over a point on a 2D pivot in Java [closed]

I'm trying to figure out how to rotate a vector over a point (another vector) as a PIVOR tried on some sites that gave me the following code: public Vector2 rotate_point(float cx,float cy,float angle,Vector2 p) { float s = (float) Math.sin...
asked by 19.05.2017 / 23:58
1
answer

Error java.lang.NoClassDefFoundError - ErrorErrorClass [closed]

I'm trying to upload an application made here at work and every time I try to run the tomcat of this error. I have already researched and apparently speaks that the class is using another class that is not in my classpayj. How do I fix th...
asked by 11.10.2018 / 15:01
2
answers

Call javascript passing php variable

I need to call a javascript by passing a php variable to it, when I put the whole script in php I can pass the variable like this location: '<?php echo $cidade;?>, BR' , but when I call it that <script src="clima.js"></sc...
asked by 14.06.2016 / 07:24
2
answers

Read an excerpt from a String

As you have seen my question above, I want to get only one part that interests me from a String, for example, I have a String preco whose text is R$ 20,00 , how do I get only the number? Another question is that if I try to add a se...
asked by 03.04.2016 / 02:09
2
answers

How do I call another screen in java, I can not

Follows the code of MainPageClass package telas; import java.awt.BorderLayout; import java.awt.EventQueue; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.border.EmptyBorder; import java.awt.Window.Type; import javax...
asked by 17.06.2014 / 02:26
1
answer

Problem with programming logic in Java

Good afternoon to all, I started two weeks ago a sequence of studies on programming for Android. I'm studying for this book. link I bought it a while ago and thank God I finally arrived on page 341 which is database. It has a class...
asked by 02.12.2014 / 21:47
2
answers

JavaFX does not allow creating events

First of all, I've researched StackOverFlow on similar posts but did not find it. I'm having a problem with JavaFX because it gives an error every time I try to set any event on whatever component it is (a Button, textArea, etc.). NOTE: I did...
asked by 05.01.2019 / 01:09
1
answer

I'm trying to apply object orientation to a program in Java

I'm trying to apply object orientation to this program and I wanted to start by swapping these if s, does anyone have any tips on what to put in place? import java.util.*; public class MenuPizza { protected static Scanner l; p...
asked by 03.10.2017 / 21:07
1
answer

Java Calculator [duplicate]

I have a creation block here pfvr help me, I would like to put a "AC" button to reset the result can anyone give me an idea?    My code looks like this: private JButton numero0; private JButton numero1; private JButton numero2; private JButt...
asked by 12.09.2016 / 20:07
1
answer

Arraylist Declaration? [closed]

I have seen some examples of usage and some use the ArrayList statement, List<> and ArrayList<> at startup.     
asked by 08.07.2016 / 19:13