Posts by Matob • 36 points
4 posts
-
0
votes2
answers2192
viewsA: Decimal places when using Println in Java
You already solved, but could use the class DecimalFormat package java.text. She has the method format() which receives a decimal and formats as you wish.…
-
1
votes3
answers5189
viewsA: How to pass editText value to attribute to int type on Android?
You can use parseint yes, but since it is an editText, you can insert a non-numeric character, causing an exception, so this needs to be handled
-
0
votes3
answers902
viewsA: Pass value to a java function
<Button android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="@string/self_destruct" android:onClick="selfDestruct" /> taken from the above answer, it is quite…
-
1
votes3
answers2826
viewsA: Add image to . jar
I don’t know if it’s been resolved, but I’ll answer it. When I use images in my projects I create a folder inside the project folder and do so: Icon about = new ImageIcon("minhaPasta/Java2.jpg");…