
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
George John has Published 1081 Articles

George John
986 Views
To disable the close button, let us first create a frame −JFrame frame = new JFrame("Login!");Use the setDefaultCloseOperation() to set the status of the close button. Set it to DO_NOTHING_ON_CLOSE to disable it −frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);The following is an example to disable close button on a JFrame in Java −Examplepackage my; import ... Read More

George John
390 Views
The strokeRect() method of the HTML canvas is used to create a rectangle on a web page. The element allows you to draw graphics on a web page using JavaScript. Every canvas has two elements that describes the height and width of the canvas i.e. height and width respectively.Following ... Read More

George John
2K+ Views
To remove last char if it is a specific character then use SUBSTRING(). Let us first create a table −mysql> create table DemoTable ( SubjectName varchar(100) ); Query OK, 0 rows affected (0.47 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('MySQL'); ... Read More

George John
304 Views
To separate components in a row or column, use the createGlue() method. This creates an invisible "glue" component that separates components.The following is an example to separate components in a row or column with Box −Examplepackage my; import java.awt.BorderLayout; import javax.swing.Box; import javax.swing.BoxLayout; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JScrollPane; public ... Read More

George John
253 Views
The value attribute of the element is used to set the value of the list item. Since the value is a number, it would be set only for the ol element in HTML i.e. the ordered list.Following is the syntax −Above, num is the value of the list item ... Read More

George John
3K+ Views
The word order is a reserved order in MySQL and you have used it in the query. To get rid of the syntax error, you need to use backticks(` `) around the order.The correct syntax is as follows −select *from yourTableName ORDER BY `order` DESC;Let us first create a table ... Read More

George John
386 Views
The content attribute of the element is used to set the meta information in an HTML document. This can be the information for the description or the keywords, for name attribute.Following is the syntax:Above, the text is the meta information.Let us now see an example to implement the content ... Read More

George John
892 Views
While creating a GridLayout, you need to set the rows and columns as parenthesis. A GridLayout is used to create a layout the specified number of rows and columns.Let’s say we have a GridLayout, with 1 row and 4 columns −GridLayout layout = new GridLayout(1, 4);The following is an example ... Read More

George John
2K+ Views
Customize the layout by changing the look and feel of the panel in which you added the component −ImageIcon icon = new ImageIcon(new URL("http −//www.tutorialspoint.com/images/C-PLUS.png")); JLabel label = new JLabel(icon); JPanel panel = new JPanel(new GridBagLayout()); panel.add(label); panel.setOpaque(true); panel.setBackground(Color.ORANGE);Above, we have added an image and even updated the background color ... Read More

George John
119 Views
Tha data attribute of the element sets the URL of the resource, which can be audio, video, pdf, flash, etc. used by the object.Following is the syntax:The url is the URL of the resource used by the object.Let us now see an example to implement the data attribute of ... Read More