Click here to Skip to main content
14,267,388 members
   

Java

 
PinnedForum Guidelines - PLEASE READ Pin
Chris Maunder28-Jul-09 2:36
adminChris Maunder28-Jul-09 2:36 
QuestionRecommendation: Learn from GITHUB project Pin
Anisul Huq7-Aug-19 18:20
memberAnisul Huq7-Aug-19 18:20 
AnswerRe: Recommendation: Learn from GITHUB project Pin
Richard MacCutchan7-Aug-19 22:04
protectorRichard MacCutchan7-Aug-19 22:04 
Questionhow to use class for sending notification in android? Pin
Member 145520336-Aug-19 2:53
memberMember 145520336-Aug-19 2:53 
QuestionMy Simple servlet is called twice, i dont know why. Pin
yinallier15-Aug-19 20:27
memberyinallier15-Aug-19 20:27 
AnswerRe: My Simple servlet is called twice, i dont know why. Pin
Gerry Schmitz6-Aug-19 5:50
mveGerry Schmitz6-Aug-19 5:50 
QuestionJavaFX CSS "dynamic" value not being used Pin
Valentinor2-Aug-19 23:03
memberValentinor2-Aug-19 23:03 
I'm having a weird problem with my CSS. If I go into the file and set the following two properties manually, it is working, but if I set them from java code (.setStyle()), for some reason they aren't being used.
Properties:
-fx-font-family
-fx-font-size

So if in the file I use the following syntax it is working fine:
-fx-font-family: "Blackadder ITC"; 
-fx-font-size: 18;

I used that font family because it is clear to see if it is changed or not.

Then I changed that with the following set to be able to change the font (family and size) straight from my java code.
-fx-font-family: fontFam;
-fx-font-size: fontDim;


In java code I have this:
String fontFam = "Blackadder ITC";
int fontDim = 18;
.setStyle("fontFam: \"" + fontFam + "\"; fontDim: " + fontDim + ";");

I have other css properties in this .setStyle (to set some rgba colors), and they are working fine, the problem is only with the font.
The first problem is that the font family doesn't get applied, and the second one is the font size, I'm getting the following warning:
WARNING: CSS Error parsing file: file location: Expected '<number>' while parsing '-fx-font-size' at [6,16]

Unfortunately I can't simply use .setFont for this, because it is part of DataPicker, more precise it's TextField.

Isn't this the way you are suppose to do it, or for font property I have to do something different?
AnswerRe: JavaFX CSS "dynamic" value not being used Pin
Valentinor10-Aug-19 0:58
memberValentinor10-Aug-19 0:58 
QuestionJava Derby Database Pin
Gregory Guy30-Jul-19 20:16
memberGregory Guy30-Jul-19 20:16 
AnswerRe: Java Derby Database Pin
Richard MacCutchan30-Jul-19 21:16
protectorRichard MacCutchan30-Jul-19 21:16 
QuestionMessage Closed Pin
25-Jul-19 0:22
professionalVivid Colors25-Jul-19 0:22 
QuestionAnnotation Processing - Generating Files at Each Round vs at Last Round Pin
Abbas A. Ali3-Jul-19 19:44
professionalAbbas A. Ali3-Jul-19 19:44 
QuestionBasic Calculator Write a program that works as a simple calculator. 1.It reads a character (ch) 2.If ch is among '+', '-', '*', '/' or '%' it furthur takes two numbers (N1 and N2 as input). It then performs appropriate appropriate operation between n Pin
Member 1450000613-Jun-19 22:55
memberMember 1450000613-Jun-19 22:55 
AnswerRe: Basic Calculator Write a program that works as a simple calculator. 1.It reads a character (ch) 2.If ch is among '+', '-', '*', '/' or '%' it furthur takes two numbers (N1 and N2 as input). It then performs appropriate appropriate operation betwe Pin
Richard Deeming14-Jun-19 0:55
mveRichard Deeming14-Jun-19 0:55 
AnswerRe: Basic Calculator Write a program that works as a simple calculator. 1.It reads a character (ch) 2.If ch is among '+', '-', '*', '/' or '%' it furthur takes two numbers (N1 and N2 as input). It then performs appropriate appropriate operation betwe Pin
Richard MacCutchan14-Jun-19 1:06
protectorRichard MacCutchan14-Jun-19 1:06 
QuestionFailed to grab focus on a Jtextfield Pin
Member 1413007922-May-19 4:06
memberMember 1413007922-May-19 4:06 
SuggestionRe: Failed to grab focus on a Jtextfield Pin
Richard MacCutchan22-May-19 21:32
protectorRichard MacCutchan22-May-19 21:32 
GeneralRe: Failed to grab focus on a Jtextfield Pin
Member 1413007923-May-19 1:07
memberMember 1413007923-May-19 1:07 
GeneralRe: Failed to grab focus on a Jtextfield Pin
Richard MacCutchan23-May-19 1:44
protectorRichard MacCutchan23-May-19 1:44 
Questioncloudsim algorithm Genitic Pin
Member 1423906220-May-19 8:20
memberMember 1423906220-May-19 8:20 
AnswerRe: cloudsim algorithm Genitic Pin
Richard MacCutchan20-May-19 22:09
protectorRichard MacCutchan20-May-19 22:09 
QuestionHow can i make Jtexfield updates when Jtable values are changed? Pin
Member 141300798-May-19 2:36
memberMember 141300798-May-19 2:36 
AnswerRe: How can i make Jtexfield updates when Jtable values are changed? Pin
Richard MacCutchan8-May-19 2:48
protectorRichard MacCutchan8-May-19 2:48 
GeneralRe: How can i make Jtexfield updates when Jtable values are changed? Pin
Member 141300798-May-19 3:02
memberMember 141300798-May-19 3:02 
GeneralRe: How can i make Jtexfield updates when Jtable values are changed? Pin
Richard MacCutchan8-May-19 3:19
protectorRichard MacCutchan8-May-19 3:19 

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.