Articles on Trending Technologies

Technical articles with clear explanations and examples

Tutorix - AI Tutor

How to hide the track on the slider in Java?

Nishtha Thakur
Nishtha Thakur
Updated on 30-Jul-2019 350 Views

To hide the track on the slider, you need to use the setPaintTrack() method and set it to FALSE −JSlider slider = new JSlider(JSlider.HORIZONTAL, 0, 100, 55); slider.setInverted(true); slider.setMinorTickSpacing(10); slider.setMajorTickSpacing(25); slider.setPaintTicks(true); slider.setPaintLabels(true); slider.setPaintTrack(false);The above method setPaintTrack() is by default set to TRUE.The following is an example to hide the track on the slider −Examplepackage my; import java.awt.Color; import java.awt.Font; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JSlider; import javax.swing.WindowConstants; public class SwingDemo {    public static void main(String[] args) {       JFrame frame = new JFrame("Frame with Slider");       JSlider slider = new JSlider(JSlider.HORIZONTAL, 0, 100, 55);   ...

Read More

How secure bitcoin currency is?

Prasanna Kotamraju
Prasanna Kotamraju
Updated on 30-Jul-2019 383 Views

From a connoisseur to a novice who deal in Bitcoin have a number of questions in terms of the security of this currency. However, they should not be worried because crypto is securer than existing currencies, banks, and other financial institutes.Thanks to Blockchain technology, which is backing it. Transactions are recorded in public, distributed ledger turn it more transparent and makes it even harder to temper it.However, cryptocurrency transactions and Blockchain ledgers do have a few security flaws, but they are not essentially the fault of the underlying technology. The structure of Bitcoin and its Blockchain means there are facets ...

Read More

Java DatabaseMetaData getSearchStringEscape() method with example

Vikyath Ram
Vikyath Ram
Updated on 30-Jul-2019 258 Views

The getSearchStringEscape() method of the DatabaseMetaData interface is used to get the that is used to escape the wildcard characters ('_' or, '%') by the underlying database.This method returns a string parameter representing the value that is used to escape wildcard charactersTo get the DatabaseMetaData object −Make sure your database is up and running.Register the driver using the registerDriver() method of the DriverManager class. Pass an object of the driver class corresponding to the underlying database.Get the connection object using the getConnection() method of the DriverManager class. Pass the URL the database and, user name, password of a user in the database, ...

Read More

How to remove menus from MenuBar in Java?

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 545 Views

Remove a menu from the MenuBar using the remove() method. Set the index for the menu you want to remove from the MenuBar.Let’s say we have the following two menus initially −The following is an example to remove one the above menus. Let’s say we are removing the 2nd menus “Edit” −Examplepackage my; import java.awt.event.KeyEvent; import javax.swing.JFrame; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; public class SwingDemo {    public static void main(final String args[]) {       JFrame frame = new JFrame("MenuBar Demo");       frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);       JMenuBar menuBar = new JMenuBar();       JMenu ...

Read More

How to Mine Ethereum?

Prasanna Kotamraju
Prasanna Kotamraju
Updated on 30-Jul-2019 286 Views

Ethereum Mining GuideEthereum Blockchain BasicsAs we all know, cryptocurrency mining is a process of solving complicated mathematical puzzles and miners play a crucial role in any cryptocurrency network as they spend their time and computing power to puzzle out those math problems, giving a ‘proof of work’ for the network, which verifies Ether transactions. Other than this, miners are responsible for making new Ether tokens through this process. This way, they get rewards in Ether for successfully completing a proof of work task.The more miners join the group, the puzzles automatically turn out more difficult to solve. This leads to ...

Read More

How to arrange components in a Flow to be right-justified in Java?

Nishtha Thakur
Nishtha Thakur
Updated on 30-Jul-2019 196 Views

Use FlowLayout.RIGHT to arrange components in a FlowLayout to be right-justified. −JFrame frame = new JFrame("Language"); frame.setLayout(new FlowLayout(FlowLayout.RIGHT));The following is an example to arrange components in a flow to be right-justified −Examplepackage my; import java.awt.Color; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Font; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JTextArea; import javax.swing.WindowConstants; public class SwingDemo {    public static void main(String[] args) {       JFrame frame = new JFrame("Language");       frame.setLayout(new FlowLayout(FlowLayout.RIGHT));       JLabel label = new JLabel("Most Spoken Language ");       label.setPreferredSize(new Dimension(220, 70));       label.setOpaque(true);       label.setBackground(Color.RED);     ...

Read More

Display tick marks in a JSlider with Java

Anvi Jain
Anvi Jain
Updated on 30-Jul-2019 1K+ Views

To display tick marks in a JSlider, you need to use the setPaintTicks() method and set it to TRUE −JSlider slider = new JSlider(JSlider.HORIZONTAL, 0, 100, 75); slider.setPaintTicks(true);The following is an example to display tick marks in a slider in Java −Examplepackage my; import java.awt.Color; import java.awt.Font; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JSlider; import javax.swing.WindowConstants; public class SwingDemo {    public static void main(String[] args) {       JFrame frame = new JFrame("Frame with Slider");       JSlider slider = new JSlider(JSlider.HORIZONTAL, 0, 100, 75);       slider.setMinorTickSpacing(5);       slider.setMajorTickSpacing(20);       slider.setPaintTicks(true);   ...

Read More

How do bitcoin ATMs work?

Prasanna Kotamraju
Prasanna Kotamraju
Updated on 30-Jul-2019 368 Views

This might fall upon like a shock on those who think that only cash can be transact from an ATM. In this era of crypto and digital currency, things have taken a leap now. Thanks to technology! As of April 2019, there are more than 4, 518 bitcoin ATMs across the globe, the number is constantly on the surge, and so is the miners considering the fascination for this currency.However, the thought of getting them cash out leave many miners baffled; however, this read has been created to clear the air about all the doubts you have.The Functionality of Bitcoin ...

Read More

How to style an Android notification using InboxStyle?

Nishtha Thakur
Nishtha Thakur
Updated on 30-Jul-2019 257 Views

This example demonstrate about How to style an Android notification using InboxStyleStep 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.     Step 3 − Add the following code to src/MainActivity.package app.tutorialspoint.com.notifyme ; import android.app.NotificationChannel ; import android.app.NotificationManager ; import android.os.Bundle ; import android.support.v4.app.NotificationCompat ; import android.support.v7.app.AppCompatActivity ; import android.view.View ; public class MainActivity extends AppCompatActivity {    public static final String NOTIFICATION_CHANNEL_ID = "10001" ;    private final static String default_notification_channel_id = "default" ...

Read More

How to set vertical gap between elements in a GridLayout with Java?

George John
George John
Updated on 30-Jul-2019 2K+ Views

Use the setVgap() method to set the vertical gap between elements in a GridLayout. Let’s say we have a GridLaypout −GridLayout layout = new GridLayout(3, 3);Set the horizontal gap −layout.setVgap(30);The following is an example −Examplepackage my; import java.awt.Color; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Font; import java.awt.GridLayout; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextArea; import javax.swing.WindowConstants; public class SwingDemo {    public static void main(String[] args) {       JFrame frame = new JFrame("Sections");       JPanel panel = new JPanel();       panel.setBackground(Color.blue);       GridLayout layout = new GridLayout(3, 3);     ...

Read More
Showing 58181–58190 of 61,298 articles
Advertisements