mirror of
https://github.com/anas-elgarhy/JColorfulConsole.git
synced 2024-08-14 23:57:19 +00:00
Add more examples
This commit is contained in:
parent
645fb37233
commit
3b9df3f430
1 changed files with 35 additions and 5 deletions
40
README.md
40
README.md
|
@ -10,9 +10,39 @@
|
|||
|
||||
### Usage:
|
||||
```java
|
||||
ConsoleManager manager = new DefaultConsoleManager(); // Create a new console manager
|
||||
manager.setTextColor(TextColor.LIGHT_RED); // Set text color
|
||||
manager.setBackgroundColor(BackgroundColor.DARK_BLUE); // Set background color
|
||||
ConsoleManager manager = new DefaultConsoleManager(); // Create a new console manager
|
||||
manager.setTextColor(TextColor.LIGHT_RED); // Set text color
|
||||
manager.setBackgroundColor(BackgroundColor.DARK_BLUE); // Set background color
|
||||
|
||||
manager.println("Hello World!"); // Print text
|
||||
```
|
||||
manager.println("Hello World!"); // Print text
|
||||
```
|
||||
<img src="./Screenshots/1.png">
|
||||
|
||||
```java
|
||||
ConsoleManager manager = new DefaultConsoleManager(); // Create a new console manager
|
||||
manager.setTextColor(TextColor.LIGHT_RED); // Set text color
|
||||
manager.setBackgroundColor(BackgroundColor.DARK_BLUE); // Set background color
|
||||
manager.setTextStyle(TextStyle.ITALIC); // Set text style
|
||||
|
||||
manager.println("Hello World!"); // Print text
|
||||
```
|
||||
<img src="./Screenshots/2.png">
|
||||
|
||||
```java
|
||||
public class Example1 {
|
||||
public static void main(String[] args) {
|
||||
ConsoleManager manager = new DefaultConsoleManager();
|
||||
|
||||
manager.print("Hello", BackgroundColor.DARK_YELLOW, TextColor.DARK_WHITE, TextStyle.BOLD, TextStyle.ITALIC);
|
||||
manager.print(", ", TextColor.LIGHT_GREEN);
|
||||
manager.print("I'm ", TextColor.DARK_YELLOW);
|
||||
manager.print("Anas", TextColor.LIGHT_BLUE, TextStyle.DOUBLE_UNDERLINE);
|
||||
manager.println(" :D", TextColor.LIGHT_CYAN);
|
||||
manager.println("\tFrom", TextColor.LIGHT_RED, TextStyle.ITALIC);
|
||||
manager.print("Eg", BackgroundColor.LIGHT_RED);
|
||||
manager.print("y", BackgroundColor.DARK_WHITE);
|
||||
manager.print("pt", BackgroundColor.DARK_BLACK);
|
||||
}
|
||||
}
|
||||
```
|
||||
<img src="./Screenshots/3.png">
|
Loading…
Reference in a new issue