Click here to Skip to main content
15,886,919 members
Home / Discussions / Java
   

Java

 
AnswerRe: What database shoud i pick for my java app? Pin
Kelly Ferguson19-May-19 22:57
Kelly Ferguson19-May-19 22:57 
AnswerRe: What database shoud i pick for my java app? Pin
remote4me21-Jun-19 2:40
remote4me21-Jun-19 2:40 
QuestionHow to add JMenu Pin
Member 1431822321-Apr-19 0:57
Member 1431822321-Apr-19 0:57 
AnswerRe: How to add JMenu Pin
Richard MacCutchan21-Apr-19 22:21
mveRichard MacCutchan21-Apr-19 22:21 
AnswerRe: How to add JMenu Pin
E2E Training Academy8-Aug-19 0:37
E2E Training Academy8-Aug-19 0:37 
Questionspeech recognition project in java for controlling your pc using voice java Pin
Member 1422299418-Apr-19 23:56
Member 1422299418-Apr-19 23:56 
AnswerRe: speech recognition project in java for controlling your pc using voice java Pin
Richard MacCutchan19-Apr-19 0:34
mveRichard MacCutchan19-Apr-19 0:34 
Questiong.drawString is not printing the correct value in Jpanel. Pin
chandra12212-Apr-19 5:01
chandra12212-Apr-19 5:01 
<pre>g.drawString is not printing the correct value in Jpanel.
The program is few thousand lines long. So I am posting a snippet where the error occurs

String tmpStg=new String(Integer.toString(val3));
System.out.format("%d %d %s %s\n",indexOfBlock,indexOfBlock1,String.valueOf(indexOfBlock1),tmpStg);
g.drawString(String.valueOf(indexOfBlock1),thsXPosWithBorder+10,thsYPosWithBorder);
System.out.format("%d %d %d\n",indexOfBlock,indexOfBlock1,val3);

Output of this section of the code is
0 8 8 8
0 8 8
While the values in print statement are correct. The value printed on the jpanel using g.drawString
is not correct. The g.drawString method prints 0 in the graphics panel instead of 8. The value in indexOfBlock1
is 8 and value in indexOfBlock is 0. Value in val3 is also same as value in indexOfBlock1. But if
I print it through g.drawString then it shows value as 0.</pre>
QuestionRe: g.drawString is not printing the correct value in Jpanel. Pin
Richard MacCutchan12-Apr-19 6:19
mveRichard MacCutchan12-Apr-19 6:19 
AnswerRe: g.drawString is not printing the correct value in Jpanel. Pin
chandra12212-Apr-19 18:58
chandra12212-Apr-19 18:58 
GeneralRe: g.drawString is not printing the correct value in Jpanel. Pin
Richard MacCutchan12-Apr-19 20:51
mveRichard MacCutchan12-Apr-19 20:51 
GeneralRe: g.drawString is not printing the correct value in Jpanel. Pin
chandra12212-Apr-19 22:57
chandra12212-Apr-19 22:57 
GeneralRe: g.drawString is not printing the correct value in Jpanel. Pin
Richard MacCutchan12-Apr-19 23:23
mveRichard MacCutchan12-Apr-19 23:23 
QuestionPreview implementing 10 cross validation Pin
Member 142144734-Apr-19 22:41
Member 142144734-Apr-19 22:41 
QuestionGlobal variables are not supported in C# Pin
Brian_TheLion27-Mar-19 21:04
Brian_TheLion27-Mar-19 21:04 
AnswerRe: Global variables are not supported in C# Pin
Richard MacCutchan27-Mar-19 22:26
mveRichard MacCutchan27-Mar-19 22:26 
GeneralRe: Global variables are not supported in C# Pin
Brian_TheLion27-Mar-19 23:40
Brian_TheLion27-Mar-19 23:40 
GeneralRe: Global variables are not supported in C# Pin
Richard MacCutchan27-Mar-19 23:45
mveRichard MacCutchan27-Mar-19 23:45 
GeneralRe: Global variables are not supported in C# Pin
Brian_TheLion27-Mar-19 23:58
Brian_TheLion27-Mar-19 23:58 
GeneralRe: Global variables are not supported in C# Pin
Richard MacCutchan28-Mar-19 0:03
mveRichard MacCutchan28-Mar-19 0:03 
GeneralRe: Global variables are not supported in C# Pin
Brian_TheLion28-Mar-19 0:13
Brian_TheLion28-Mar-19 0:13 
GeneralRe: Global variables are not supported in C# Pin
Richard MacCutchan28-Mar-19 1:43
mveRichard MacCutchan28-Mar-19 1:43 
GeneralRe: Global variables are not supported in C# Pin
Brian_TheLion28-Mar-19 2:02
Brian_TheLion28-Mar-19 2:02 
GeneralRe: Global variables are not supported in C# Pin
jschell13-Apr-19 6:42
jschell13-Apr-19 6:42 
GeneralRe: Global variables are not supported in C# Pin
Member 145588955-Oct-19 18:16
Member 145588955-Oct-19 18:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.