Set Default Font Color in Tailwind CSS

Disha Verma
Updated on 30-Oct-2024 10:27:02

651 Views

Many Tailwind CSS developers struggle to set a default font color, resulting in inconsistent text styling and inefficient workflows due to frequent style overrides. Tailwind provides utility classes to set font colors, helping keep the design consistent without needing custom CSS. Approaches to Set Default Font Color Tailwind CSS enables us to set the default font color using the following approaches: Using the global utility Using the @layer Directive Using a Tailwind CSS Plugin Using The Global Utility With the Global Utility Class in ... Read More

Sort a List in Case-Sensitive Order in Java

karthikeya Boyini
Updated on 29-Oct-2024 18:51:32

1K+ Views

In this article, we will learn to sort a List in case-sensitive order in Java. Sorting in case-sensitive order places uppercase letters before lowercase letters (e.g., 'A' before 'a'), meaning that uppercase letters are prioritized in sorting. This program uses Java’s built-in Collections.sort method to arrange elements in this specific order.  Problem Statement Given a list of mixed uppercase and lowercase letters, write a Java program that sorts the list in a case-sensitive order. Input { "P", "W", "g", "K", "H", "t", "E" } Output List = [P, W, g, K, H, t, E] Case Sensitive Sort = [E, H, ... Read More

Reverse Integer Array Using Lambda Expressions in Java

Krantik Chavan
Updated on 29-Oct-2024 18:51:17

839 Views

In this article, we will learn to get the reverse of an Integer array with Lambda expressions in Java. By utilizing the Arrays.sort() method along with a custom comparator defined as a lambda expression, we can efficiently reorder the elements of the array in descending order. Lambda expressions are a concise way to represent functional interfaces, allowing you to write cleaner and more readable code. Problem Statement Write a program in Java to get the reverse of an Integer array with Lambda expressions − Input arr = {20, 50, 75, 100, 120, 150, 170, 200} Output Integer Array elements... 20 50 ... Read More

Print Matrix in Z Form using Java

AmitDiwan
Updated on 29-Oct-2024 18:51:04

777 Views

In this article, we will learn to print a matrix in a "Z" pattern in Java. It starts from the top-left corner, moves horizontally across the top row, then diagonally down through the center, and finally across the bottom row. This pattern creates a "Z" shape with selected elements from the matrix. Problem Statement Write a program in Java to print a matrix in Z form. Input my_arr[][] = { { 34, 67, 89, 0}, { 0, 1, 0, 1 }, { 56, 99, 102, 21 }, {78, 61, 40, 99}} Output The matrix is34 67 89 0 0 99 ... Read More

Design a Portfolio Webpage Using HTML and CSS

Nikhilesh Aleti
Updated on 29-Oct-2024 17:32:52

21K+ Views

To design a portfolio webpage using HTML and CSS can be useful to showcase your best works and attract attention of professionals in collaborating or hiring you. Portfolio website serves as a platform to display your work and demonstrate your skills. It has the same purpose as a CV (Curriculum vitae). The portfolio website will showcase them with engaging visual images and often more detailed than a hand-written CV. In this article, we will learn and understand how we can design a portfolio webpage using HTML and CSS through stepwise explanation and example code. Why Create a Portfolio Website? ... Read More

Set Height of a Single Row in JTable with Multiple Rows

Smita Kapse
Updated on 29-Oct-2024 00:38:55

883 Views

In this article, we create a JTable in Java Swing to display information about different programming technologies and their tutorial availability. The table is set up with specific columns and rows, each containing data on a particular technology. We also demonstrate how to set a custom height for a single row in the table. Specifically, the height of the 4th row is adjusted to 30 pixels to show how you can control row height individually in a JTable. The table is then displayed within a scrollable JFrame window. table.setRowHeight(3, 30); The above sets row height to 30 pixels for row index ... Read More

Print First Letter of Each Word Using Regex in Java

AmitDiwan
Updated on 29-Oct-2024 00:38:40

890 Views

In this article, we will understand how to print the first letter of each word using regex. A regular expression is a sequence of characters that forms a search pattern. A regular expression can be a single character or a more complicated pattern. A regular expression helps you match or find other strings or sets of strings, using a specialized syntax held in a pattern. They can be used to search, edit, or manipulate text and data. Problem Statement Write a program in Java to print the first letter of each word using regex. Below is a demonstration of the same ... Read More

Java ResultSetMetaData getTableName Method with Example

Rishi Raj
Updated on 29-Oct-2024 00:38:12

1K+ Views

In this article, we will use Java’s JDBC to connect to a MySQL database and retrieve the name of the table associated with a specific column in a ResultSet. By accessing the ResultSetMetaData interface, we can utilize its getTableName() method to identify the table that contains a given column, which is especially useful when working with complex queries or multiple joined tables. To get the ResultSetMetaData object, you need to − Register the Driver: Select the required database and register the Driver class of the particular database using the registerDriver() method of the DriverManager class or, the forName() method of ... Read More

Set Preferred Size for BoxLayout Manager in Java

Nishtha Thakur
Updated on 29-Oct-2024 00:37:55

2K+ Views

In this article, we will learn to set the preferred size for a panel within a JFrame using the BoxLayout manager in Java Swing. By setting the preferred and maximum size for the panel, we can control the layout’s appearance, ensuring that the panel maintains a consistent size as other components are added. This approach is useful when arranging elements vertically or horizontally in a structured format while having specific size requirements. Steps to set preferred size for BoxLayout Manager The following are the steps for setting the preferred size for BoxLayout Manager in Java − ... Read More

Tailwind CSS vs Bootstrap

Riya Kumari
Updated on 28-Oct-2024 17:45:51

36K+ Views

CSS (Cascading Style Sheets) is a stylesheet language used to style the HTML elements in a webpage. A CSS framework is a library which enables the developers to design more standard-compliant websites using CSS in an easier way. These libraries are ready-to-use so there is no need of writing the long and monotonous CSS codes. In this article, we will discuss about the two popular CSS frameworks: Tailwind CSS and Bootstrap. Tailwind CSS Tailwind CSS was developed by Adam Wathan. Tailwind CSS is a utility-first and low-level framework of CSS. It offers single-purpose classes which can be directly ... Read More

Advertisements