Java:如何通过jcombo列表获取表达式 [英] Java : how to get the expression through the jcombo list
问题描述
如何使用Java swing创建单行表达式,链接图像图片。每分钟,每天,每月,每个工作日和每小时需要将其转换为*,并且所有组合框都包含数字列表列表编号链接和工作日包含点击图片
我想要的是,如果用户选择每分钟,每天,月= 2,工作日=星期一,小时= 3
工作日记录JCombo:星期日= 0,星期一= 1,星期二= 2 .....
输出将打印为:* * 2 1 3
非常感谢。
我尝试过:
String sjcb_EM = jcb_EM.getSelectedItem()。toString( );
String sjcb_EH = jcb_EH.getSelectedItem()。toString();
String sjcb_ED = jcb_ED.getSelectedItem()。toString();
String sjcb_EEM = jcb_EEM.getSelectedItem()。toString();
String sjcb_EW = jcb_EW.getSelectedItem()。toString();
字符串vb_1 = sjcb_EM ++ sjcb_EH ++ sjcb_ED ++ sjcb_EEM ++ sjcb_EW;
检查用户选择的值,如果它包含单词Every,则用星号替换它
How do i create the one line expression using Java swing, link image picture. the every minute, every day,every month, every weekday and every hour need to convert it to "*" and also all the combo box contain the list of number list number link and weekday contain the click the picture
what i want is, if the user select "Every Minute" , "Every day","month = 2", "Weekday = monday", "hour= 3"
note of weekday JCombo : sunday = 0 , monday = 1, tuesday = 2 .....
the output will print as : * * 2 1 3
thanks alot.
What I have tried:
String sjcb_EM = jcb_EM.getSelectedItem().toString(); String sjcb_EH = jcb_EH.getSelectedItem().toString(); String sjcb_ED = jcb_ED.getSelectedItem().toString(); String sjcb_EEM = jcb_EEM.getSelectedItem().toString(); String sjcb_EW = jcb_EW.getSelectedItem().toString(); String vb_1 = sjcb_EM + " " + sjcb_EH + " " + sjcb_ED + " " + sjcb_EEM + " " + sjcb_EW;
Check the value selected by the user, and if it contains the word "Every" replace it with an asterisk.
这篇关于Java:如何通过jcombo列表获取表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!