<prompt> Nataka kazi Java kuonyesha GUI histogram ya orodha ya idadi.  <response>: Here is an example Java function that uses the JFreeChart library to display a GUI histogram of a given number list:import java.util.List;import javax.swing.JFrame;import org.jfree.chart.ChartFactory;import org.jfree.chart.ChartPanel;import org.jfree.chart.JFreeChart;import org.jfree.chart.axis.NumberAxis;import org.jfree.chart.plot.PlotOrientation;import org.jfree.chart.plot.XYPlot;import org.jfree.data.statistics.SimpleHistogramBin;import org.jfree.data.statistics.SimpleHistogramDataset;public class HistogramGUI public static void showHistogramList list SimpleHistogramDataset dataset new SimpleHistogramDatasetNumber Distribution; for double num : list dataset.addBinnew SimpleHistogramBinnum, num, true, true; JFreeChart chart ChartFactory.createHistogramHistogram, Number, Frequency, dataset, PlotOrientation.VERTICAL, false, false, false; XYPlot plot chart.getXYPlot; NumberAxis domain NumberAxis plot.getDomainAxis; domain.setAutoRangeIncludesZerofalse; JFrame frame new JFrameHistogram; frame.setDefaultCloseOperationJFrame.DISPOSE_ON_CLOSE; ChartPanel panel new ChartPanelchart; frame.setContentPanepanel; frame.pack; frame.setVisibletrue; To use this function, you can pass in a list of numbers using the following code:List numbers Arrays.asList1.0, 2.0, 3.0, 1.5, 2.5, 2.5, 4.0;HistogramGUI.showHistogramnumbers; This will display a GUI histogram of the numbers in the list. You can customize the appearance of the histogram by changing the chart title, axis labels, and other properties using the JFreeChart API. 