Smita Kapse has Published 542 Articles

How to set local date/time in a table using LocalDateTime class in Java?

Smita Kapse

Smita Kapse

Updated on 21-May-2025 14:41:55

3K+ Views

The java.time package of Java provides a class named LocalDateTime is used to get the current value of local date and time. Using this in addition to date and time values, you can also get other date and time fields, such as day-of-year, day-of-week, and week-of-year. Setting the Local time ... Read More

How many ways are there to register a driver in Java?

Smita Kapse

Smita Kapse

Updated on 11-Apr-2025 13:56:25

1K+ Views

In this article, we will learn different ways to register a driver in Java. JDBC (Java Database Connectivity) is a standard API used to connect Java applications with databases. Before interacting with a database, you must register the JDBC driver so that the DriverManager can recognize and load it.To connect with ... Read More

Java DatabaseMetaData getMaxBinaryLiteralLength() method with example.

Smita Kapse

Smita Kapse

Updated on 02-Jan-2025 19:13:59

100 Views

In this article, we will learn about the getMaxBinaryLiteralLength() method of the DatabaseMetaData interface in JDBC.  getMaxBinaryLiteralLength() method The getMaxBinaryLiteralLength() method of the DatabaseMetaData interface is used to find out the maximum number of characters (hex) that the underlying database allows for a binary literal. ... Read More

Java Program to insert styled text in a JTextPane Component

Smita Kapse

Smita Kapse

Updated on 23-Dec-2024 18:10:28

673 Views

In this article we will learn to insert styled text into a JTextPane component in Java. The JTextPane component is a versatile text editor that supports rich text features, including the ability to style text with different fonts, colors, and sizes. By leveraging the StyledDocument and Style classes, you can ... Read More

Errors in C/C++

Smita Kapse

Smita Kapse

Updated on 29-Nov-2024 18:52:31

12K+ Views

In C or C++, we face different kinds of errors. These errors can be categorized into five different types. These are like below − Syntax Error Run-Time Error Linker Error Logical Error ... Read More

Java program to set JTextArea to wrap by word

Smita Kapse

Smita Kapse

Updated on 15-Nov-2024 18:47:36

1K+ Views

In this article, we will learn to set a JTextArea in Java to wrap text by word, ensuring that the words in the text fit neatly within the display area rather than breaking in the middle. We will create a simple GUI application using JTextArea and configure it to wrap ... Read More

Java DatabaseMetaData getMaxTableNameLength() method with example.

Smita Kapse

Smita Kapse

Updated on 08-Nov-2024 22:26:39

102 Views

In this article, we will learn how to use the getMaxTableNameLength() method of the DatabaseMetaData interface in Java. The getMaxTableNameLength() method is used to find the maximum number of characters allowed for a table name in the underlying database. It returns an integer value. If the result is 0, it ... Read More

Java DatabaseMetaData getMaxStatements() method with example.

Smita Kapse

Smita Kapse

Updated on 08-Nov-2024 22:26:10

120 Views

In this article, we will learn how to retrieve the maximum number of open statements allowed by a database using the DatabaseMetaData interface in Java. The getMaxStatements() method of the DatabaseMetaData interface is used to find out the maximum number of open statements (objects) that the underlying database allows at ... Read More

Java DataBaseMetaData getMaxCatalogNameLength() method with example.

Smita Kapse

Smita Kapse

Updated on 07-Nov-2024 17:46:03

67 Views

In this article, we will learn how to retrieve the maximum number of characters allowed in a catalog name using the getMaxCatalogNameLength() method in Java. This method belongs to the DatabaseMetaData interface, which provides comprehensive information about the database, including its structure and capabilities. The method is useful for understanding ... Read More

Java program to set the height of only a single row in a JTable with multiple rows

Smita Kapse

Smita Kapse

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

785 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 ... Read More

1 2 3 4 5 ... 55 Next
Advertisements