The JTextField component in javax.swing package is a general-purpose text field that accepts any input character. Often applications need to restrict the text field to accept only a certain type of inputs. One such use case is – the text field only allows numbers without decimal points (integers) and also it must restrict the length of characters.
A Full-Fledged Java-Based HTTP Client
We are going to write a mini-browser that can establish a connection with any website (URL) over HTTP protocol and then send requests & receive response messages. For example, you may hit https://google.com and receive the HTML content or hit a REST API endpoint and receive JSON content.
How to use the Java Instrumentation API to determine object size?
In Java 1.5 Instrumentation API was introduced to enable byte-code modification (instrumentation) of classes and to get runtime insights. This is very helpful to tool developers. In this article, we’ll see how Instrumentation API can be leveraged to determine approximate object size at runtime.
MongoDB Spring Example
1. Context In this article, we have seen steps of creating a SpringBoot based imaginary TV program guide app that connects to PostgreSQL using JPA. The same code works for any relational database available in the market. We have to
Spring Boot app connecting to PostgreSQL using JPA
We are going to create a spring boot app that connects to the PostgreSQL database using JPA. Let us build an imaginary TV program guide web app that lists and allows us to search TV channels, programs, etc.