Smita Kapse has Published 498 Articles

How to position component at the top of the grid cell with GridBagLayout in Java?

Smita Kapse

Smita Kapse

Updated on 30-Jul-2019 22:30:26

660 Views

To position components at the top fo the grid cell, set the GridBagConstraints. Let’s say we have a panel and within that two CheckBox components −JPanel panel1 = new JPanel(new GridBagLayout()); JCheckBox checkBox1 = new JCheckBox("Undergraduate"); JCheckBox checkBox2 = new JCheckBox("Graduate");Position the components now −panel1.add(checkBox1, new GridBagConstraints(0, 0, 1, 1, ... Read More

How to insert a DATALINK object into a table using JDBC?

Smita Kapse

Smita Kapse

Updated on 30-Jul-2019 22:30:26

295 Views

A DATALINK object represents an URL value which refers to an external resource (outside the current database/data source), which can be a file, directory etc.You can store a DATALINK into an SQL table using the setURL() method of the PreparedStatement interface. This method accepts an integer value representing an index ... Read More

Start and stop an Android notification from broadcast receiver?

Smita Kapse

Smita Kapse

Updated on 30-Jul-2019 22:30:26

694 Views

This example demonstrate about Start and stop an Android notification from broadcast receiverStep 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 ... Read More

The Exposed Terminal Problem

Smita Kapse

Smita Kapse

Updated on 30-Jul-2019 22:30:26

14K+ Views

In wireless LANs (wireless local area networks), the exposed terminal problem is a transmission problem that arises when a transmitting station is prevented from sending frames due to interference with another transmitting station. This is prevalent in decentralised systems where there aren’t any entity for controlling transmissions. This occurs when ... Read More

Where are the app cookies stored on the iPhone?

Smita Kapse

Smita Kapse

Updated on 30-Jul-2019 22:30:26

4K+ Views

Cookies are small files which are stored on a user's device while browsing internet.When we talk about cookies in iPhone we usually talk about application using the Web Views or the browser applications.A normal iOS application does not contains cookies. An app will have cookies only if the application has one ... Read More

Group all documents with common fields in MongoDB?

Smita Kapse

Smita Kapse

Updated on 30-Jul-2019 22:30:26

380 Views

For this, use the $addToSet operator. Let us first create a collection with documents −> db.findDocumentWithCommonFieldsDemo.insertOne(    {       "UserId":1,       "UserName":"Carol"    } ); {    "acknowledged" : true,    "insertedId" : ObjectId("5cdf8ebebf3115999ed51200") } > db.findDocumentWithCommonFieldsDemo.insertOne(    {       "UserId":2,       ... Read More

How to create a MySQL table based on JDBC Result Set?

Smita Kapse

Smita Kapse

Updated on 30-Jul-2019 22:30:26

468 Views

The ResultSetMetadata class provides various methods that gives information about the current ResultSet object such as number of columns, name of the table, name of the column, datatype of the column etc…To prepare a CREATE query you need to get −Name of the table, using the getTableName() method.Column count, to ... Read More

How to Ping External host from Swift in iOS?

Smita Kapse

Smita Kapse

Updated on 30-Jul-2019 22:30:26

1K+ Views

Sometime you may require to ping an external website and check whether it’s up and running before you do any processing or fire request on the same.Here we will be seeing how to check whether the external website is up and running.Let’s being by Creating new projectStep 1 − Open ... Read More

How to start a service from notification in Android?

Smita Kapse

Smita Kapse

Updated on 30-Jul-2019 22:30:26

928 Views

This example demonstrate about How to start a service from notification in Android.Step 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 ... Read More

How to display count of notifications in Android app launcher icon?

Smita Kapse

Smita Kapse

Updated on 30-Jul-2019 22:30:26

3K+ Views

This example demonstrate about How to display count of notifications in Android app launcher icon.Step 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.   ... Read More

Advertisements