Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Programming Articles - Page 1952 of 3366
616 Views
You can add an effect to any node object in JavaFX using the setEffect() method. This method accepts an object of the Effect class and adds it to the current node.A blend effect is the one that blends two inputs together. The javafx.scene.effect.Blend class represents the blend effect. To add the blend effect to a text node −Instantiate the Text class bypassing basic the x, y coordinates (position), and text string as arguments to the constructor.Set desired properties like font, stoke, etc.Instantiate the Blend class.Set the blend mode using the setMode() method.Create two different inputs by applying effects or changing colors.Set ... Read More
333 Views
You can add an effect to any node object in JavaFX using the setEffect() method. This method accepts an object of the Effect class and adds it to the current node.The reflection effect renders the reflection of the given content below it. The javafx.scene.effect.Reflection represents the reflection effect. To add a blur effect to a text node −Instantiate the Text class bypassing basic the x, y coordinates (position), and text string as arguments to the constructor.Set desired properties like font, stoke, etc..Create a blur effect by instantiating the Reflection class.Set the created effect to the text node using the setEffect() ... Read More
239 Views
You can add an effect to any node object in JavaFX using the setEffect() method. This method accepts an object of the Effect class and adds it to the current node.javafx.scene.effect.InnerShadow class represents the inner shadow effect. This effect renders the shadow of the given content inside its edges, with the specified parameters (color, offset, radius).To add a reflection effect to a text node −Instantiate the Text class bypassing basic the x, y coordinates (position), and text string as arguments to the constructor.Set desired properties like font, stoke, etc.Create the inner shadow effect by instantiating the InnerShadow class.Set the created ... Read More
1K+ Views
You can add an effect to any node object in JavaFX using the setEffect() method. This method accepts an object of the Effect class and adds it to the current node.javafx.scene.effect.DropShadow class represents a drop shadow effect. This effect renders the shadow of the given content behind it, with the specified parameters (color, offset, radius).Therefore, to add a drop shadow effect to a text node −Instantiate the Text class bypassing basic the x, y coordinates (position), and text string as arguments to the constructor.Set desired properties like font, stoke, etc..Create the drop shadow effect by instantiating the DropShadow class.Set the created ... Read More
381 Views
You can have multiple text nodes in a single flow using the TextFlow layout. To have different fonts to single text flow.Create multiple text nodes.Set desired fonts to them.Add all the created nodes to the text flow.Exampleimport java.io.FileNotFoundException; import javafx.application.Application; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.paint.Color; import javafx.stage.Stage; import javafx.scene.text.Font; import javafx.scene.text.FontWeight; import javafx.scene.text.Text; import javafx.scene.text.TextFlow; public class TextFlowExample extends Application { public void start(Stage stage) throws FileNotFoundException { //Creating a text object String str1 = "Hi "; Text text1 = new Text(30.0, 110.0, str1); //Setting the ... Read More
279 Views
The javafx.scene.text.Text class has a property named fontSmoothingType, which specifies the smoothing type of the text. You can set the value to this property using the set setFontSmoothingType() method accepts two parameters −FontSmoothingType.GRAY − This specifies the default grayscale smoothing.FontSmoothingType.LCD − This specifies the LCD smoothing. This uses the characteristics of an LCD display and enhances the smoothing of the node.To add an LCD display to a text −Create a text node by instantiating the javafx.scene.text.Text class.Create a required font using one of the font() methods of the javafx.scene.text.Font class.Set the font to the text using the setText() method.Set the ... Read More
8K+ Views
You can set the desired font to the text node in JavaFX using the setFont() method. This method accepts an object of the class javafx.scene.text.Font.The Font class represents the fonts in JavaFX, this class provides several variants of a method named font().as shown below −font(double size) font(String family) font(String family, double size) font(String family, FontPosture posture, double size) font(String family, FontWeight weight, double size) font(String family, FontWeight weight, FontPosture posture, double size)All these methods are static and returns a Font object. To set a font you need to create the font object using one of these methods and set the ... Read More
927 Views
In this problem, we are given input from the user. Our task is to create a program to find out the data type of user input in C++.Problem Description − We will take input from the user and check the data type of the input value.Let’s take an example to understand the problem, Example 1:Input − 34Output − It is an integerExample 2:Input − tutorialspointOutput − It is a stringSolution Approach:We will check if the input string is a number or not a number.If it is a number, we will check if it is an integer or a float value.If ... Read More
2K+ Views
In this problem, we are given the size of a chessboard. Our task is to create a program to find number of squares in a chessboard in C++.Problem Description − To find the number of squares in a chessboard. We will have to calculate all the combinations of the square that are inside the chessboard i.e. we will consider squares of side 1x1, 2x2, 3x3 … nxn.Let’s take an example to understand the problem, Input: n = 4.Output: 30Squares of size 1x1 -> 16 Squares of size 2x2 -> 9 Squares of size 3x3 -> 4 Squares of size 4x4 ... Read More
349 Views
In this problem, we are given a quadratic equation of type ax2 + bx + c, where a, b and c are constants. Our task is to create a program to find number of solutions in Quadratic Equation in C++.Problem Description − Here, we need to find the numbers of solutions for a quadratic equation that can have at max 2 solutions.Let’s take a few examples to understand the problem, Example 1:Input − 3x2 + 7x + 4Output − 2Explanation − the two solutions of the equation are 1 and 4/3.Example 2:Input − x2 - 4x + 4Output − 1Explanation ... Read More