Need help creating a drop down button with Java

I am fairly new to programming in Java. Currently I am trying to create a button that when clicked will produce a drop down. For example, you have a user input field that does a google type rolling search and separate from that is a button that when clicked will display a window to the right of it that brings up all available options.

Here is my button:

<input id = "mainContainer" type = "button" value = " + ";>

Is there a way to create a drop down menu after clicking the button with html or css? Or does this need to be in javascript?

It does not seem that difficult theoretically but I do not know much about java so I don't really have to much of a starting point. I would believe that I would just need an onClick() event that will create a new menu. I just don't know how to write this out in java. I Also need to complete this project in the next 2 weeks so any help will be greatly appreciated.

If you could provide code with an explanation of how it works I would be probably the happiest dude in the world. Any reference would be appreciated.


You can write your own using javascript or use some UI components such as: jQuery AutoComplete

Category:java Time:2017-12-04 Views:3

Related post

  • How to create a drop-down list in java swing with multiple item selection? 2010-05-18

    I'm aware of JList and JComboBox. I need the combo box drop down functionality with multiple selection functionality that JList provides. This is because the contents of the list are too huge to be displayed using a simple list. I also need to select

  • Java: How can I add a JMenu to a JPanel or create a drop down button? 2009-04-08

    is there any way to add a JMenuItem to a JPanel so that I can create a button to show multiple options, like the latest news button in firefox, under the address bar? I can only add JMenu and JMenuItems to a JMenuBar, JPopupMenu and other JMenus and

  • Create reusable drop down list with Rails 2011-10-16

    I would like to create a simple drop down list with static values which I could reuse anywhere in my Ruby on Rails application in a form. The drop down list is really simple, something like this: <select> <option value="5">5 minutes</o

  • Needing help creating a dropdown html panel with easing effect 2012-10-28

    I have been trying to add a width & height adjustable dropdown panel that will bounce down and when the person wants to close it it will bounce back up. The panel must be able to contain any html content. I have been searching the web for days an

  • Creating a drop down list with option to add to list 2013-10-13

    I'm creating a drop down list in Word 2007. List is comprised of customers and I would like to have an option to "Add" a customer. Clicking on add would bring up a dialog box in which to type customer's name. How can I do this? --------------Solution

  • Creating a drop down list with a functionality depending on choice 2015-03-04

    I want to create a drop down list (e.g. list of currencies, EUR;USD;CHF) such that whenever one currency is chosen, it will create a plot (using the data for that currency) for that chosen currency. Do I have to write a code in VBA?(I dont know how t

  • How can I create a drop down menu with google app engine? 2010-07-21

    I trying to make a drop down menu with Google app engine and I follow above instruction from above website, it seems css file is not working with google app engine ?? Does anyone know how to m

  • Parsing a JSON object with jQuery and creating two drop down lists with that data 2010-09-10

    I am trying to dynamically create two drop down lists, one will be provinces, and the other will contain the cities of each province, so when a user chooses a province, the cities drop down will populate, I am using jQuery's $.ajax function to get th

  • How to create a drop down menu with a table? 2010-10-28

    I'm trying to create a drop down menu similar to what you would see with a 'ul'. The difference being I want to do it with a table. When the page loads I have td's with their 'display' attribute equal to 'none'. This hides the td for me. The problem

  • How to create a drop down populated with previous four weeks in php 2012-04-23

    How to create a drop down navigation of the current week and previous weeks up to four in php. $date = '04/24/20012'; $ts = strtotime($date); $year = date('o', $ts); $week = date('W', $ts); for($i = 1; $i <= 7; $i++) { $ts = strtotime($year.'W'.$w

  • How can I create a Drop Down list with a different color background for each selection? 2013-05-01

    I am trying to create a drop down list in a cell. I have done that successfully, but I want to have a different colored cell background for each selection on the drop down. How would I go about doing that? Thanks --------------Solutions-------------

  • How to create filtered drop down menues with Excel 2010 2013-12-15

    A quick example of what I am trying to do is create multiple column drop down lists. Column A is a list of companies. Column B is a list of products. Column B has the same list for each company. However, Column C is to be the specific name for that p

  • Creating a drop down list with functions as the list 2014-09-07

    I need a drop down that has the following list: None Average Count Count numbers Max Min Sum StdDev Var More Functions... All the functions work automatically - I just have to click on whatever function and it calculated in the cell. Also, when More

  • Creating a Drop Down Menu with Xcode 4.3.2 Storyboards 2012-04-28

    I'm a noob at Obj-C, and especially at the concept of storyboarding. It seems like storyboarding could be so awesome yet it is not intuitive at all. I'm trying to make it so when this button is pressed, the user will see a drop down menu letting them

  • How do I create a drop down list with each value functioning as a link to another page? 2011-11-17

    I am trying to create a navigation shortcut on a web page using a drop down list. I have the basic list: <form> <label for="xx">Select a Location</label> <select name="xx" id="xx"> <option selected>Please select one</

  • Creating a Drop-Down Menu with Javascript 2012-04-02

    Question about logics here: What's the most elegant way to make the menu appear/disappear onmouseover/onmouseout? See the following JsBin: The Menu is hidden by default. If the user moves his cursor above the Link

  • How do I create simple round-rectangle buttons with Java Swing? 2011-07-13

    I'm using a simple "Calculator" project as an example of rounded-rectangular buttons. The entire project consists of one small class file. Here it is: import java.awt.BorderLayout; import java.awt.GridLayout; import java.awt.event.KeyEvent; import ja

  • Need help creating extension method in C# with generics and lambda expression 2011-07-19

    I'm pulling all of the advanced features together for this one, but haven't worked with generics or lambda expressions very much: Here's example usage of the method I want to create: MyClass mc = null; int x = mc.TryGetOrDefault(z => z.This.That.T

  • Create a drop down box within an excel spreadsheet that will take me to a specific cell. 2013-06-23

    I have seveal large spreadsheets (8-10 pages). Each has various department categories. Information to be posted comes randomly. Currently we have to scroll up and down the sheets to find the category we need. I tried using the 'find and replace' func

  • Qt: Drop-down button? 2011-04-17

    How can I create a "drop down button" in Qt? For a non-Qt example, see: Combination button/dropdown in office The key point is that the widget needs an icon for the primary action, and a visually separate "pulldown arrow" to show secondary icons / ac

Copyright (C), All Rights Reserved.

processed in 0.616 (s). 13 q(s)