1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
blagie [28]
3 years ago
8

How can multiple items be selected at the same time in aJList?

Computers and Technology
1 answer:
Karo-lina-s [1.5K]3 years ago
5 0

Answer:

JList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION)

Explanation:

JList provides for simultaneous selection of multiple items upon setting the selection mode to MULTIPLE_INTERVAL_SELECTION. The API call for this purpose is:

jlist.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION)

Once the selection mode has been set , we can select set of items in the list as follows:

jlist.setSelectedIndices({1,3,5});

This will select the items with indices 1,3,5 in the list.

You might be interested in
Which avenue may utilize video streaming, audio narration, print designs and animation?
Shtirlitz [24]

Answer:

Multimedia avenue.

Explanation:

A file type is the standard used to store data such as pictures, texts, videos, and audios. All file types have unique file extension that determine which program to use to open a particular file and to access its data e.g pictures (jpeg, png), texts (txt, docx, rtf), videos (mp4, 3gp, avi), audios (mp3, acc).

Sometimes, computer users make the mistake of opening files with the wrong software application or program, this often leads to an error due to the incompatibility of the software application with the particular file.

Basically, all software applications are designed and developed for use with specific file extensions or formats and as such, when used to open a file it isn't developed for, it result in an error.

A multimedia avenue refers to a channel that is designed and developed to accept, utilize and combine various file formats such as audio, video, text, animation effects, etc. A common example of a multimedia avenue is Microsoft PowerPoint software.

Hence, the multimedia avenue may utilize video streaming, audio narration, print designs and animation.

8 0
3 years ago
The manufacturer doesn't need it the buyer doesn't want it the user doesn't know they're using it
Vikentia [17]
That means that the production vause a loss in supply and demand
6 0
3 years ago
What purpose would tracking changes be most useful for?
olya-2409 [2.1K]
So, you can be able to make a prediction and understand the cycle.
6 0
3 years ago
Item = "quesadilla"
jok3333 [9.3K]

Answer:

item = "quesadilla"

meat = "steak"

queso = False

guacamole = False

double_meat = False

base_price = 4.5

if item == "quesadilla":

base_price = 4.0

elif item == "burrito":

base_price = 5.0

if meat == "steak" or meat == "pork":

base_price += 0.50

if meat == "steak" and double_meat:

base_price += 1.50

elif meat == "pork" and double_meat:

base_price += 1.50

elif double_meat:

base_price += 1.0

if guacamole:

base_price += 1.0

if queso and item != "nachos":

base_price += 1.0

print(base_price)

Explanation:

  • Use a conditional statement to check if meat is steak or pork then add 0.50 to base_price .
  • Check if the meat is steak or pork, then double_meat adds 1.50 or 1.0 otherwise .
  • Check if meat is steak and its double_meat , then add 1.50  and if its for guacamole, then add 1.00 to base_price . If queso is there and item is not nachos, add 1.00 to base_price .
  • Finally when item is nachos, no need to add any money to base_price .

7 0
3 years ago
From the practice directory, you wish to capture a listing of files and directories to a file in your user2 directory, thus allo
MArishka [77]

Answer:

variable(s) determine the amount of potential energy an object has?

Explanation:

6 0
3 years ago
Other questions:
  • Which of the following Internet protocols is used to request and send pages and files on the World Wide Web?
    15·1 answer
  • Technician A says that a system should be recharged with refrigerant until the condenser temperature is equal to the ambient tem
    9·1 answer
  • A user notices that a mobile device is draining power faster than is normal. What are three causes of quick battery drain? (Choo
    5·1 answer
  • Write the definition of a function named fscopy. This function can be safely passed two fstream objects, one opened for reading,
    11·1 answer
  • Pls help computer science I will give brainliest
    8·2 answers
  • 4. What is the connection between productivity and Microsoft Office/ Office 365?
    13·1 answer
  • A source mainly provides <br> from a text or piece of media.
    6·2 answers
  • What is "mob of the dead"?
    7·1 answer
  • Can someone please help me answer the extension activity and the exit ticket. I’ll award you. Thanks❤️.
    12·1 answer
  • Please do this now
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!