Questions tagged [settext]

The concept of assigning text to a UI element

The concept of assigning text to a UI element.

Does not specifically refer to a programming language-specific or library-specific API but the general concept.

793 questions
-3
votes
1 answer

Android TextView setText results in empty text

I try to set the text of a TextView programmatically within a Fragment. The code for the classes is as follows: public abstract class AbstractFragment extends Fragment { @Override protected void onActivityResult(int requestCode, int…
der_chirurg
  • 1,475
  • 2
  • 16
  • 26
-3
votes
3 answers

How to call setText() using a Float?

i tried to call the setText() using the float but it dosnt seem to work can somone help me fix the problem? public class Bmi extends MainActivity { @Override protected void onCreate(Bundle savedInstanceState) { …
Ashraf Rahman
  • 65
  • 1
  • 2
  • 11
-3
votes
2 answers

how set a textView in ADT android?

i am beginner in android,and i write this code in ADT v22.6.2: protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); if (savedInstanceState == null) { …
-3
votes
2 answers

Storing editText to variables, Android Java

I posted this question before, however i didnt explain myself good. I will have the other question removed. Here is my current situation: I have a regular xml page with a textView which when clicked opens a popup dialog. This dialog contains 2…
user3247335
  • 181
  • 2
  • 5
  • 16
-3
votes
2 answers

How to dynamically set a JLabel text

int variable = 100; label = new JLabel("variable"); How do I make this display "100" on screen and not "variable"
Shadowkillsa
  • 77
  • 1
  • 8
-3
votes
1 answer

How to show(add) JTextArea after button click?

i want to show my JTextArea after button CONNECT_BUTTON is clicked. What should I do ? Furthermore i'm trying to add some grid in my JTextArea because I want to use it for show some records from databse. Any ideas how to do that ? package…
user3196130
  • 33
  • 2
  • 5
-3
votes
3 answers

tempUITextView setText: @"some text" gives an error

i created a UIView* myView and then i created a UITextVIew *tempUITextView and set its text as [tempUITextView setText:@"some text"]; [myView addSubView: tempUITextView]; when i run the code, it gives an error: Terminating app due to uncaught…
Neo
  • 2,807
  • 1
  • 16
  • 18
-4
votes
1 answer

Default text in JTextArea

I am trying to set default text in a JTextArea. I have tried the .setText but that doesn't seem to work. Maybe I am coding it wrong? The code is as follows: package RootOfFunctionX; import java.awt.BorderLayout; import java.awt.Dimension; …
Stefan
  • 93
  • 2
  • 14
-4
votes
1 answer

Beginner Hangman Game

I am making a hangman game where if I guess the wrong letter of the word in aLetter I add 1 onto the label inCorrect, however this code is adding 1 onto inAccurate when I guess correctly aswell. How can I fix this? public class Form extends…
Vestel
  • 51
  • 1
  • 2
  • 6
-4
votes
1 answer

clearing a JLabel not working

I have read several posts suggesting to clear a JLabel (displayEntered) on a panel (display) with text by using the setText(" "). However, I have tried this and the outcome is it is just posting the array entered twice and does not clear the first…
-5
votes
3 answers

Android : How to differentaite setText and manually entered text

I have an EditText. setText() method of EditText is called on button click . I want to identity if button click is used or user manually enters the location. I have used TextWatcher , the afterTextChange() is called on if user manually enters…
sa_infinite
  • 49
  • 2
  • 5
-5
votes
1 answer

How do i start a new line in String?

Possible Duplicate: how do i create a multiline string in EditText? i want to display a string in a multiline EditText. Currently, the string displays as.... Receive: 0 coin(s) Total Cost: $100 I want want it to display…
B. Money
  • 931
  • 2
  • 19
  • 56
-7
votes
1 answer

android setText

I want to calculate the circumference of a circle and put the results in a TextView. public void hesapla1(View v){ double pi = 3.14; double yari = R.id.e1; double alan = pi * Math.pow(yari,2); …
1 2 3
52
53