- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Smita Kapse has Published 558 Articles
Smita Kapse
142 Views
To create a JMenuBar component, use the JMenuBar class −JMenuBar menuBar = new JMenuBar();Now, create menus inside the MenuBar −JMenu fileMenu = new JMenu("File");Add the above menu to the MenuBar −menuBar.add(fileMenu);The following is an example to create a JMenuBar Component in Java −Examplepackage my; import java.awt.event.KeyEvent; import javax.swing.JFrame; import javax.swing.JMenu; ... Read More
Smita Kapse
6K+ Views
Here we will see, how to terminate the threads in C++11. The C++11 does not have direct method to terminate the threads.The std::future can be used to the thread, and it should exit when value in future is available. If we want to send a signal to the thread, but ... Read More
Smita Kapse
219 Views
Binary search is a fast search algorithm with run-time complexity of Ο(log n). This search algorithm works on the principle of divide and conquer. For this algorithm to work properly, the data collection should be in the sorted form.Binary search looks for a particular item by comparing the middle most ... Read More
Smita Kapse
131 Views
Let’s say, here we are incrementing StudentScores for MongoDB which is inside StudentDetails −... "StudentScores": { ... "StudentMathScore": 90, ... "StudentMongoDBScore": 78 ... }Let us first create a collection with documents −> db.embeddedValueIncrementDemo.insertOne( ... { ... "StudentDetails": { ... "StudentScores": ... Read More
Smita Kapse
3K+ Views
With echo char, you can set a character that would appear whenever a user will type the password in the JPasswordField.Let us first create a new JPassword field −JPasswordField passwd = new JPasswordField();Now, use the setEchoChar() to set the echo char for password field. Here, we have asterisk (*) as ... Read More
Smita Kapse
762 Views
In C++, there is no direct way to check the environment architecture. There are two Macros for Windows systems, that can be used to check the architecture. These macros are _WIN64, and _WIN32. When the system is 64-bit, then the _WIN64 will be 1, otherwise the _WIN32 will be 1. ... Read More
Smita Kapse
462 Views
It is the program to print prime numbers in a given range.AlgorithmsBegin Declare a user define datatype stl. Declare a vector number to the stl datatype. Declare variable a to the stl datatype. Declare vector Prime_Number to the Boolean datatype. Prime_Number[0] = false. ... Read More
Smita Kapse
594 Views
To set the row height, use the setRowHeight and set a parameter that would be the number of pixels you need to set the row height.However, if you want to set the row height of a single row then you need to use the same method, but set an additional ... Read More
Smita Kapse
140 Views
At first, let us create a horizontal slider −JSlider slider = new JSlider(JSlider.HORIZONTAL, 0, 100, 55);Now, we will set it to move right-to-left using setInverted() −slider.setInverted(true);The following is an example to move the horizontal slider right-to-left −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; ... Read More
Smita Kapse
229 Views
It is a program to find the minimum value of a binary search tree.AlgorithmsBegin Declare nd as a structure. Declare d to the integer datatype. Declare pointer lt to the structure nd type. Declare pointer lt to the structure nd type. Declare function new_nd() to ... Read More