Downloads – Kensoft PH https://kensoftph.com Power up your knowledge in programming Sun, 06 Oct 2024 13:41:47 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.1 https://kensoftph.com/wp-content/uploads/2021/07/cropped-Kensoftph-New-logo-32x32.png Downloads – Kensoft PH https://kensoftph.com 32 32 How to Take a Screenshot on PC Using Kenshot: A Full Guide https://kensoftph.com/how-to-take-a-screenshot-on-pc-using-kenshot/ https://kensoftph.com/how-to-take-a-screenshot-on-pc-using-kenshot/#respond Thu, 18 Jan 2024 08:26:22 +0000 https://kensoftph.com/?p=3969 Discover how Kenshot transforms ordinary screenshots into professional visuals with ease and flexibility.

Key Takeaway:

  • Download Kenshot: Easy installation from the official site.
  • Capture Options: Full screen or specific regions.
  • Annotation Tools: Add text, shapes, and cover sensitive info.
  • Save & Share: Save as JPEG/PNG or copy to clipboard.

How to Take a Screenshot on PC using Kenshot

Every now and then, we come across information on our computer screens that we would like to save for later reference or to share. Whether it’s a snippet of an amusing social media post, a graphically appealing infographic, or a specific kind of information to help us understand better through communication, the simplest way to capture this is by taking a screenshot. But how to take a screenshot on PC that’s not just a simple capture but is editable and presentable too? That’s where Kenshot comes in. This powerful tool not only allows you to take a screenshot on PC but also helps you emphasize your capture with various features.

Understanding Kenshot: More than a Screenshot Tool

Before we delve into how to take a screenshot on PC using Kenshot, it’s essential to understand what Kenshot offers. This user-friendly tool transcends the limits of a basic screenshot tool, providing sophisticated yet accessible functionalities to enhance your captures. From adding personalized annotations to cover up sensitive information, Kenshot keeps you in control, ensuring your captures are precisely what you envisioned.

Step-by-Step Guide on How to Take a Screenshot on PC Using Kenshot

Wondering how to take a screenshot on PC using Kenshot? Let’s break it down into simple steps to get you started:

Download and Install Kenshot

Firstly, download Kenshot from its official website. The installation process is straightforward. Run the installer file and follow the on-screen instructions to complete the installation.

Setup Kenshot

Upon successful installation, launch Kenshot. It will open the main window of the application and if you have a license to use all the features of Kenshot, you can simply go the Settings and License tab to register the application using your license. If you are wondering how to find your software license, you can go to Kenshot and Sign up if you don’t have an account yet and you will find the license in the My Account area.

Once you close the window of Kenshot, you can still open the application and it is located in the system tray of your computer in the taskbar.

Capture Your Screen

There are lots of ways to take a screenshot using Kenshot. If you’re on a Free version of the application, you can take a screenshot by opening the application by clicking the “Take a Screenshot” button or you can also right-click the Kenshot icon in the system tray and click on “Shot” menu.

If you have a Kenshot license, and it is registered to your application, you can simply press the “PrintScreen” on your keyboard easily and conveniently to take a screenshot on pc using Kenshot then you can choose a region to take a screenshot.

Capture the entire screen

Capturing the entire screen is pretty much the same process but when the window is shown as you select a region, you can simply press the “Spacebar” of your keyboard to take a whole screen shot but you don’t have to select a region, just simple press the spacebar and the save whole screen screenshot.

Annotate Your Screenshot

Once you take a screenshot, Kenshot will allow you to insert annotations directly from the screenshot region if your application is registered. This feature is very useful to transform your captures into informative visual aids. You can add like text, arrows, rectangle, line and more. You can also cover up any confidential information from the screenshot by using the fill feature and you can use the circle or rectangle to do this.

Take a screenshot on pc using kenshot annotations

Save or Copy Your Screenshot

After taking a screenshot, you can save it by clicking the Save button from the toolbar or you can simply press ctrl+s on your keyboard and the saving window will show and save the image in your preferred format (JPEG or PNG). If you want to share your screenshot instantly without saving the image, you can simply click the Copy button from the toolbar or by pressing the ctrl+c to copy the image and share it with your friends or family to any social media platform.

The Verdict: Taking Screenshot Made Easy

Learning how to take a screenshot on PC using Kenshot indeed simplifies your digital life. From capturing information in a snap to transforming such captures into remarkable visuals, Kenshot has got it all covered. Equipped with robust features, an intuitive user interface, and a set of flexible tools, taking a screenshot on PC has never been easier.

How do you take a screenshot on PC using Kenshot?

To take a screenshot using Kenshot, simply install the tool, launch it, and press PrintScreen. Choose a region or capture the full screen. Annotate and save your screenshot in the desired format for sharing.

Video Tutorial

]]>
https://kensoftph.com/how-to-take-a-screenshot-on-pc-using-kenshot/feed/ 0 How to take a screenshot easily using Kenshot Application nonadult
How to use Java Jsoup Tutorial | 100% perfect for beginners https://kensoftph.com/how-to-use-java-jsoup-tutorial-for-beginners/ https://kensoftph.com/how-to-use-java-jsoup-tutorial-for-beginners/#comments Thu, 16 Dec 2021 09:20:09 +0000 https://kensoftph.com/?p=1816 Java Jsoup Tutorial

Java Jsoup tutorial is a powerful Java library for extracting and manipulating data from websites using HTML5 DOM methods and CSS selectors. This library is designed to scrape and parse HTML from a URL, but it can also find and extract data through DOM traversal or CSS selectors. It is also capable of manipulating HTML elements, attributes, and text. To avoid XSS attacks, it can also clean the content submitted by user.

Jsoup Example

You may use this Java Library to develop your own Java application to scrape data from a URL, and if you want to learn more Java programming tutorials, you can go here to check out other programming tutorials. In this Jsoup tutorial, I will demonstrate how to use this Library or API (Application Programming Interface).

Jsoup Tutorial Java

In this Jsoup Tutorial Java, You will learn how to download and integrate the Java library into your Java program. If you are using Java Ant, Maven, or Java Gradle, please continue reading to learn how to download the library. Let’s start with Java Ant and then go on to Maven and Gradle.

Jsoup Ant

If you are using Jsoup Ant, you will need to download the jar file (core library). After you have downloaded the jar file, you must place it in your project library or the global library. To include the jar file into your project, go to the Libraries section and add the jar file. There is another method to add the jar file; try it if you don’t want to locate the jar file every time you use it. Follow the steps below if you are using NetBeans.

  1. Go to Tools
  2. Click on Libraries
  3. Click on New Library and enter the Library name
  4. Add the Jar at the Classpath tab

That’s how you add the jar file to your NetBeans IDE’s global Libraries.

Jsoup Maven

If you want to use Jsoup Maven, you do not need to download the jar file. Simply insert the dependencies into your Java project, insert the following code into your POM’s <dependencies> section. Simply go to jsoup.org if you don’t know the latest version of the library.

<dependency>
  <groupId>org.jsoup</groupId>
  <artifactId>jsoup</artifactId>
  <version>1.14.3</version>
</dependency>

Gradle

Add the following code, if you are using Java Gradle.

implementation 'org.jsoup:jsoup:1.14.3'

We can use this code below to see if the code is successfully linked to the specified website. The code example below will tell you if we successfully loaded the website.

Document doc = Jsoup.connect("https://kensoftph.com").get();
System.out.println(doc.title());

The output will be the Title of the specified website.

Jsoup Tutorial

Jsoup Example

In this Jsoup example, I will show a few examples of how to use this Java Library. I know you want to learn more about this library, so go to jsoup.org and navigate to Cookbook. The coverage in the following example will be loading the specified website and extracting some of the specified website’s HTML elements. It is commonly known as web scraping program using Java. Continue reading to learn more.

Example: Load a Document from a URL

Loading a document from a URL is quite simple and straightforward, as seen above. If you haven’t read the entire tutorial, please proceed below to learn how to load a document from a URL.

Document doc = Jsoup.connect("https://kensoftph.com").get();
System.out.println(doc.title());

Output

Kensoft PH

Example: Data extraction from a document

This example demonstrates how to extract data from a document. Extracting data from a document is a little hard, but if you follow the example, it will be much easy. To learn more, I recommend visiting jsoup.org’s Cookbook page.

import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;
import java.util.logging.Level;
import java.util.logging.Logger;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Label;
import javafx.scene.control.ListView;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

/**
 * FXML Controller class
 *
 * @author KENSOFT
 */
public class FX_ScraperController implements Initializable {

    @FXML
    private Label lblFrom;
    @FXML
    private ListView<String> listView;
    @FXML
    private Label lblSelectedItem;

    /**
     * Initializes the controller class.
     */
    @Override
    public void initialize(URL url, ResourceBundle rb) {
        try {
            // loading the URL
            Document doc = Jsoup.connect("https://kensoftph.com").get();
            //System.out.println(doc.title());
            lblFrom.setText("Contents from: "+doc.title());
            
            //Extracting the H3 tags and add the items to the ListView
            Elements elements = doc.getElementsByTag("h3");
            for(Element element : elements){
                String items = element.text();
                listView.getItems().add(items);
                listView.getSelectionModel().selectedItemProperty().addListener(listener ->{
                    String item = listView.getSelectionModel().getSelectedItem();
                    lblSelectedItem.setText("Selected item: "+item);
                });
            }
        } catch (IOException ex) {
            Logger.getLogger(FX_ScraperController.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}

Output

This is the output of extracting a data from an HTML document loaded from a URL.

Java Jsoup Tutorial

If you wish to download the JavaFX Project of the Simple Web Scraping application. I’ve provided a download link below so you can quickly get started and tweak it yourself. If you like my tutorials, don’t hesitate to click here or watch my YouTube Video below to learn more via video based in this article.

YouTube Video

]]>
https://kensoftph.com/how-to-use-java-jsoup-tutorial-for-beginners/feed/ 2 JavaFX Tutorial: Jsoup tutorial in Java | Web Scraping App nonadult
JavaFX WebView Tutorial | 100% best for beginners https://kensoftph.com/javafx-webview-tutorial-for-beginners/ https://kensoftph.com/javafx-webview-tutorial-for-beginners/#respond Sun, 24 Oct 2021 13:43:10 +0000 https://kensoftph.com/?p=1447 JavaFX WebView Tutorial

JavaFX WebView is a web rendering engine. JavaFX provides a web component for embedding a web browser in a JavaFX application to display its web content like Kensoft PH, GeeksforGeeks, etc. If you want to learn how to make a web browser in JavaFX, this is the best tutorial for you to start learning and making a web browser in JavaFX. To begin learning, please read the entire article. We have provided best examples for you to learn from, and you can copy those codes below.

How to use the WebView in JavaFX

To display web content using the WebView in JavaFX, you must also have the WebEngine and WebHistory classes because the WebView uses the WebEngine for the core proecessing to display its content, in short the WebEngine is in charge of all HTML and JavaScript logic, while the WebHistory represents the web browsing history. 

The WebView handles user input such as mouse and keyboard events, as well as other tasks. The WebEngine will be used most of the time when you use the WebView component in your JavaFX application because the WebEngine maintains the browsing history of all visited web pages in an instance of the WebHistory class.

Creating a web browser

An instance of the WebView class represents a web browser. Please continue with the code below to create a WebView object.

WebView webview = new WebView();

We will need the WebEngine when we’ve created the webview object. The WebView class’s getEngine() method returns the WebEngine.

WebEngine engine = webview.getEngine();

To load content from a URL, use the load() method of the WebEngine class. You could use the reload() method to reload the current page if you wanted to. Check the code below to see what it looks like.

engine.load("https://www.google.com");
//Reload the current page
engine.reload();

There is another way to load content from a string. You could use the loadContent() method to load content in a String.

  • loadContent(String content)
  • loadContent(String content, String contentType)

This method is typically used when the content is retrieved from a database or creating the content in memory. Let’s assume in the following example is a “text/html” content type.

//loading the content
String html = "<html><head><title>Kensoft PH</title></head><body><p>Learn programming with Kensoft PH</p></body></html>";
engine.loadContent(html);

//or loading the content with plain text
String txt = "JavaFX WebView";
engine.load(txt, "text/plain");

Before we get started with our examples, you can download the JavaFX project that relates to the examples below and use it to learn at your convenience. Once you have downloaded the archive file, extract it and open the project in NetBeans IDE 12.3. This is a basic JavaFX web browser that showcases basic web browser functionality.

In the following examples, we will learn and demonstrate how to create a simple web browser in a JavaFX application. We will go over loading content with the WebView in JavaFX and loading with a progress bar while the current page is still loading, as well as determining whether the URL has been loaded or loading failed. You will also learn how to go back and forward on the previous URL.

It is also very simple to learn how to zoom in and out of the content. Now, let us move on to our examples, which are based on the downloadable web browser project above.

Example 1: Displaying the content into JavaFX WebView

To load the webpage into our WebView, we’ll use a Textfield to enter the URL and a KeyPressed event to fire the URL and load the content into the WebView. So, when we press the ENTER key on the keyboard, the URL begins to load.

//I used a loadUrl() method
private void loadUrl() {
        engine = webview.getEngine();
        engine.load("https://" + txtFieldUrl.getText());
    }

//Key Pressed Event for Enter key
@FXML
    private void txtEnterKey(KeyEvent event) {
        if (event.getCode() == KeyCode.ENTER) {
            loadUrl();
        }
    }

Output

WebView in JavaFX

Example 2: Succeed or Loading Failed

In a web browser, identifying whether a page has been loaded or whether it has failed to load is also important. We’ll use the getLoadWorker() method to observe the change in the state of Worker by adding a listener to its State property, which represents the state.SUCCESSDED and state.FAILED.

engine.getLoadWorker().stateProperty().addListener((obs, oldValue, newValue) -> {
    if (newValue == Worker.State.SUCCEEDED) {
        System.out.println("Page has been loaded");
    } else if (newValue == Worker.State.FAILED) {
        System.out.println("Loading failed");
    }
});

Output

JavaFX WebView

Example 3: Loading the Progress bar

The concept of loading the progress bar is the same as in Example 2. To get the progress bar to work, we’ll use the bind() method, which connects the progress bar and the Worker, as well as the progressProperty() method, which represents the page loading progress.

progress.progressProperty().bind(engine.getLoadWorker().progressProperty());

Output

JavaFX WebView

Example 4: Reloading the page

To reload the JavaFX WebView content. You could use the WebEngine class’s reload() method.

@FXML
private void reload(ActionEvent event) {
    engine.reload();
}

Output

WebView in JavaFX

Example 5: Working on the Back and Forward Button

We will use the WebHistory class to go back and go forward. We will use the WebHistory class to go back and forward in time. The WebHistory class is used to navigate the WebEngine entry object to the location in the list of previously visited web pages.

// Forward button
@FXML
private void forward(ActionEvent event) {
    history = webview.getEngine().getHistory();
    history.go(1);
    ObservableList<WebHistory.Entry> entries = history.getEntries();
    txtFieldUrl.setText(entries.get(history.getCurrentIndex()).getUrl());
}

// Back Button
@FXML
private void back(ActionEvent event) {
    history = webview.getEngine().getHistory();
    history.go(-1);
    ObservableList<WebHistory.Entry> entries = history.getEntries();
    txtFieldUrl.setText(entries.get(history.getCurrentIndex()).getUrl());
}

Output

JavaFX WebView

Example 6: Zoom In and Zoom Out

To code the zoom function in JavaFX Webview is very easy and simple, we will the zoom property and the zoom property uses double value number. Changinng this property affects the entire content in JavaFX WebView. Here, we are zooming 10 percent of the WebView in JavaFX

@FXML
private void zoomIn(ActionEvent event) {
    webview.setZoom(webview.getZoom() + 0.10);
}

@FXML
private void zoomOut(ActionEvent event) {
    webview.setZoom(webview.getZoom() - 0.10);
}

Output

WebView in JavaFX

Example 7: Set the page title at the stage title

We can use the WebEngine or WebHistory to get the current web page title. The WebEngine is the simplest way to get the page title; however, the WebHistory is more complex than the WebEngine. The code below shows how to get the current web page title by using the WebEngine and WebHistory.

engine.getLoadWorker().stateProperty().addListener((obs, oldValue, newValue) -> {
    if (newValue == Worker.State.SUCCEEDED) {
        System.out.println("Page has been loaded");
        
        // This is how to get the page title using the WebHistory
        history = webview.getEngine().getHistory();
        ObservableList<WebHistory.Entry> entries = history.getEntries();
        
        //Since I am using to controller, I am going to code this way to access the stage
        Stage stage = (Stage) txtFieldUrl.getScene().getWindow();

        //Don't use the two lines of code below at the same time on getting the page title
        
        //Using the WebHistory to get the page title
        stage.setTitle(entries.get(history.getCurrentIndex()).getTitle());
        
        //Using the WebEngine to get the page title
        stage.setTitle(webview.getEngine().getTitle());

    } else if (newValue == Worker.State.FAILED) {
        System.out.println("Loading failed");
    }
});

Output

JavaFX WebView

Example 8: Set the URL at the textfield

We need the WebHistory class to get the page URL and set it on the Textfield. To get the page URL in JavaFX WebView, follow the example code below. Copy the code from Example 7 and add this code after getting the page title code.

txtFieldUrl.setText(entries.get(history.getCurrentIndex()).getUrl());

Output

WebView in JavaFX

YouTube Video

]]>
https://kensoftph.com/javafx-webview-tutorial-for-beginners/feed/ 0 JavaFX WebView - Building a web browser in JavaFX nonadult
Animation in Java Swing or Move components | 100% best for beginners https://kensoftph.com/animation-in-java-swing/ https://kensoftph.com/animation-in-java-swing/#comments Fri, 05 Feb 2021 13:51:00 +0000 https://kensoftph.com/how-to-move-components-in-java-programming-language-or-animation-in-java-programming-language/ Animation in Java Swing

Moving components in Java is pretty hard, but with this Application Programming Interface (API), you can simply move smoothly and easily with the components using “Kensoft Animation API“. 

Kensoft Animation

With this Jar file, you can actually move like jButton, jLabel, jPanel, etc.  Download the .jar file and implement it in your Java application.

 

Add the Kensoft Animation.jar to your libraries and import it into your code. Once you imported the package and the class. Create an object of Animation and call the public methods when you need it.

Kensoft animate = new Kensoft(); // Object of Animation

The public methods are parameterized with int start, int stop, int delay, int increment, and the component you want to animate.

  • int start – is the value of  X or Y coordinate

  • int stop – is the value of X or Y coordinate

  • int delay – is the value of milliseconds. Delay is a period of time by which something late or postponed

  • int increment – is the value (one or 1 is smoother) of the increment. It depends on you whether you run it smoothly.

  • and the component you want to animate. ( Button, Label, or whatsoever)

The syntax for importing the package

import KentHipos.Kensoft;

Animation in Java

Calling the public methods

animate.jLabelXRight(10, 500, 1, 1, jLabel);

Animation in Java

The animation or movement here is fast and smooth because of  1 millisecond of delay and 1 increment value.

Sample Code

private void jLabelMouseClicked(java.awt.event.MouseEvent evt){
    Kensoft animate = new Kensoft();
    animate.jLabelXRight(10, 500, 1, 1, jLabel);
}

Output

Animation in Java Swing

YouTube Video

]]>
https://kensoftph.com/animation-in-java-swing/feed/ 1 Java Tutorial: Animation in Java Swing nonadult