kanonmoon
kanonmoon
关注数: 25
粉丝数: 92
发帖数: 1,082
关注贴吧数: 17
问个正则表达式问题 public class Practice7 { String str = "yyyzzz"; public void ttt7() { if (str.matches("yyy")) { System.out.println("yes"); } else { System.out.println("no"); } } public static void main(String[] args) { new Practice7().ttt7(); } } 为什麽会查不到
想问一下怎样做例外分裂 例如AAA+BBB*CCC 分裂成[AAA,BBB,CCC]这个我会 但是如果想设定*号前面有Z字就不会进行分裂 例如AAA+ZZZ*CCC的情况 就会只分裂成[AAA,ZZZ*CCC]的话 应该要怎样做才好
想问怎样才可以反向分裂字串 例如str="+12345-67890*345/678" 想分裂成数组[+,-,*,/]要怎麽做啊
求string算式变成int简单算法 public class Practice8 { public static void main(String[] args) { String str = "44+33-22*11/2"; System.out.println(Integer.parseInt(str)); } } 例子是错的 想问有简单的方法可以直接把string当int算出来吗?
求多重split方法 public class Practice {String calString = "23+34-11*45/78+34"; public void calculate() {String str1[] = calString.split("\\+"); for (String f1 : str1) {String str2[] = f1.split("\\-");for (String f2 : str2)System.out.println(f2);}} public static void main(String[] args) {new Practice().calculate();}} 我想把字串中+-做个分裂 但我只会一个一个分 想问有两个或多个分裂的方法吗?
scale是什麽意思 求解释 They scale really well into late-game 例如这一句中的scale是什麽意思啊
不知道按错什麽 打错程式不会出现红字而会变成debug画面 真心不想出现这个画面啊 有辨法变回以前那样 错了只出现红字吗?
求只显示图片上半部分三分之一的写法 import java.awt.*; import java.net.*; import javax.swing.*; public class Practice5 extends JFrame { public Practice5() { super(); setTitle("背景图片"); setBounds(100, 100, 570, 430); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); final JDesktopPane desktopPane = new JDesktopPane(); getContentPane().add(desktopPane, BorderLayout.CENTER); final JLabel backLabel = new JLabel(); URL resource = this.getClass().getResource("/back.JPG"); ImageIcon icon = new ImageIcon(resource); backLabel.setIcon(icon); backLabel.setBounds(0, 0, icon.getIconWidth(), icon.getIconHeight()); desktopPane.add(backLabel, new Integer(Integer.MIN_VALUE)); } public static void main(String args[]) { Practice5 frame = new Practice5(); frame.setVisible(true); } } 想把载入的图 都全显示上半部分三分之一 求各位帮忙><
一个播放音乐的程式 求除错 import java.applet.*; import java.awt.*; import java.io.File; import java.net.MalformedURLException; import javax.swing.*; import javax.swing.filechooser.FileNameExtensionFilter; public class Practice5 extends JFrame { private static final long serialVersionUID = 1L; private JPanel jContentPane = null; private JTextField filePath = null; private JButton openFile = null; private JButton playButton = null; private File selectedFile; private AudioClip audioClip; private JTextField getJTextField() { if (filePath == null) { filePath = new JTextField(); filePath.setPreferredSize(new Dimension(200, 22)); filePath.setEditable(false); } return filePath; } // 获取选择文件按钮的方法 private JButton getOpenFile() { if (openFile == null) { openFile = new JButton(); openFile.setText("选择文件"); openFile.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { JFileChooser fileChooser = new JFileChooser(); fileChooser .setFileFilter(new FileNameExtensionFilter( "支持的音频文件(*.mid、*.wav、*.au", "wav", "au", "mp3")); fileChooser.showOpenDialog(Practice5.this); selectedFile = fileChooser.getSelectedFile(); filePath.setText(selectedFile.getAbsolutePath()); } }); } return openFile; } // 获取播放按钮的方法 private JButton getPlayButton() { if (playButton == null) { playButton = new JButton(); playButton.setText("播放"); playButton .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed( java.awt.event.ActionEvent e) { if (selectedFile != null) { try { if (audioClip != null) audioClip.stop(); audioClip = Applet .newAudioClip(selectedFile .toURI().toURL()); audioClip.play(); } catch (MalformedURLException e1) { e1.printStackTrace(); } } } }); } return playButton; } public static void main(String[] args) { Practice5 thisClass = new Practice5(); thisClass.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); thisClass.setVisible(true); } public Practice5() { super(); initialize(); } // 初始化方法 private void initialize() { this.setSize(408, 79); this.setContentPane(getJContentPane()); this.setTitle("JFrame"); } // 初始化内容面板的方法 private JPanel getJContentPane() { if (jContentPane == null) { jContentPane = new JPanel(); jContentPane.setLayout(new FlowLayout()); jContentPane.add(getJTextField(), null); jContentPane.add(getOpenFile(), null); jContentPane.add(getPlayButton(), null); } return jContentPane; } } 不知道为什麽播放不到音乐 不知道错在那里 求高手指教
用jar做了个exe档出来 但每次离开$ActLis.class就会发生错误 求解决方法 在这个问题苦恼很久了
问个URL图片路径问题 URL resource = this.getClass().getResource(""); <-- ImageIcon icon = new ImageIcon(resource); 不知道为什麽打什麽路径都找不到图片 URL的图片应该放在那的? 求高手指点
问一个小问题 import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Practice6 extends JFrame { publicPractice6() { super(); setTitle("右键菜单"); setBounds(100,100, 500, 375); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JLabellabel1 = new JLabel("Please press right chick!"); label1.setBounds(140,460, 150, 20); // <----- getContentPane().add(label1); finalJPopupMenu popupMenu = new JPopupMenu(); getContentPane().addMouseListener(newMouseAdapter() { publicvoid mouseReleased(MouseEvent e) { if(e.isPopupTrigger()) popupMenu.show(e.getComponent(),e.getX(), e.getY()); } }); JMenuItemaPage1 = new JMenuItem("剪切"); aPage1.addActionListener(newItemListener()); popupMenu.add(aPage1); JMenuItemaPage2 = new JMenuItem("复制"); aPage2.addActionListener(newItemListener()); popupMenu.add(aPage2); JMenuItemaPage3 = new JMenuItem("贴上"); aPage3.addActionListener(newItemListener()); popupMenu.add(aPage3); JMenuaPage4 = new JMenu("编辑"); popupMenu.add(aPage4); JMenuItembPage1 = new JMenuItem("只读"); bPage1.addActionListener(newItemListener()); aPage4.add(bPage1); JMenuItembPage2 = new JMenuItem("可写"); bPage2.addActionListener(newItemListener()); aPage4.add(bPage2); JMenubPage3 = new JMenu("字体"); aPage4.add(bPage3); JMenuItemcPage1 = new JMenuItem("加粗"); cPage1.addActionListener(newItemListener()); bPage3.add(cPage1); JMenuItemcPage2 = new JMenuItem("斜体"); cPage2.addActionListener(newItemListener()); bPage3.add(cPage2); } privateclass ItemListener implements ActionListener { publicvoid actionPerformed(ActionEvent e) { JMenuItemmenuItem = (JMenuItem) e.getSource(); System.out.println("你点击的是:" + menuItem.getText()); } } publicstatic void main(String args[]) { Practice6frame = new Practice6(); frame.setVisible(true); } } 不知道出了什麽事 怎样改label的位置都没有反应 求高手指教
求变成粗体文字 import java.awt.*; import javax.swing.*; import java.awt.event.*; public class Practice5 extends JFrame { static JTextField text1; static JButton button1; static JLabel label1; static String strInput; static double input, result; public Practice5() { this.setTitle("Stock Calculate"); this.setSize(500, 500); setLocationRelativeTo(null); this.setResizable(false); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } public void simplewidget() { Container container = getContentPane(); container.setLayout(null); text1 = new JTextField(""); text1.setBounds(100, 60, 100, 20); container.add(text1); button1 = new JButton(""); button1.setBounds(230, 60, 80, 20); container.add(button1); label1 = new JLabel("<html>"); label1.setBounds(50, 150, 400, 150); label1.setFont(new Font("细明体", Font.PLAIN, 13)); label1.setHorizontalAlignment(JLabel.CENTER); container.add(label1); button1.addActionListener(new ActLis()); setVisible(true); } static class ActLis implements ActionListener { public void actionPerformed(ActionEvent e) { JButton button = (JButton) e.getSource(); strInput = text1.getText(); if (button == button1) if (strInput.matches("\\d+")) { input = Double.parseDouble(strInput); result = input / 0.3; label1.setText("答案是: " + (double) Math.round(result * 100) / 100f); } else { label1.setText("please input number"); } } } public static void main(String[] args) { Practice5 pp5 = new Practice5(); pp5.simplewidget(); } } 求把数字变成粗体字
eclipse不能够编辑含有简体字的编码 我是用繁体windows的 用的是英文版的eclipse 每次复制含有简体字的编码的时候都会发生错误(例如注释上有简体字都会错误) 求解决方法
想问一下工作面试 机试的时候可以带个USB来看看笔记本吗? 工作面试时 有些时候主管会带个问题给你当场做 本人习惯做程式时都看看自己的笔记本 想问机试时可以带个USB来看看笔记本吗?
在A电脑输入 之后把输入的内容传到B电脑的记事本 求写法 在A电脑输入 之后把输入的内容传到B电脑的记事本 想写一个这样的程式 求高手教我
setBackground()anr aombc label2.setBackground(Color.LIGHT_GRAY); label2.setBackground(Color.lightGray); 这两句到底有什麽分别啊
evil is in its prime 这句应该怎样翻译啊 求高手翻译
求label内容过多自动换行方法 import java.awt.*; import javax.swing.*; public class Practice4 extends JFrame { public Practice4() { this.setTitle("I am title"); this.setSize(500, 500); setLocationRelativeTo(null); this.setResizable(false); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } public void simplewidget() { Container container = getContentPane(); container.setLayout(null); Label label2 = new Label("Create a multimedia PowerPoint presentation to show the history of computer architecture"); label2.setBounds(100, 250, 300, 80); label2.setBackground(Color.LIGHT_GRAY); container.add(label2); setVisible(true); } public static void main(String[] args) { Practice4 pp4 = new Practice4(); pp4.simplewidget(); } } 例如这个 label会自动满出的内容显示在下面的方法 先谢谢了
求一个能够读取中文字txt档的程式 求高手帮帮忙 越简单易明越好 先谢谢了
求输入数字10 之后印出随机1~10数字的10个数字 不重复数字 写法 例如输入10 之后会随机印出1~10的随机的10个数字 而且不会重复 求写法
求读取中文字txt档的方法 发现读中文字的txt档的时候 都一堆乱码 求神人可以写个能够读取中文字的txt档程式
求显示我的电脑路径 和载入TXT档内容的方法 import java.awt.*; import javax.swing.*; public class Practice2 extends JFrame { public Practice2() { this.setTitle("I am title"); this.setSize(500, 500); setLocationRelativeTo(null); this.setResizable(false); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } public void simplewidget() { Container container = getContentPane(); container.setLayout(null); JButton button1 = new JButton("txt location"); button1.setBounds(200, 350, 120, 20); container.add(button1); Label label1 = new Label(""); label1.setBounds(100, 150, 300, 300); container.add(label1); setVisible(true); } public static void main(String[] args) { Practice2 pp2 = new Practice2(); pp2.simplewidget(); } } 按键之后能够选择txt路径 之后在label显示txt档的内容
石像がしたたっている是什麽意思啊 求解释~~
メシマズ嫁是什麽意思 メシマズ嫁是什麽意思 有人知道吗?
想问一下秽れぬ和秽る有什麽分别? 求高手解释
想问一下swing触发事件的写法 import java.awt.*; import java.awt.image.BufferedImage; import javax.swing.*; import javax.imageio.ImageIO; import java.io.File; import java.io.IOException; public class Practice extends JFrame { BufferedImage image = null; public Practice() { initialize(); } private void initialize() { setTitle("I am title"); setSize(500, 500); setLocationRelativeTo(null); setResizable(false); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); try { image = ImageIO.read(new File("D:/Java/image/allgray.jpg")); } catch (IOException e) { e.printStackTrace(); } MainPane mainPane = new MainPane(); mainPane.setLayout(null); JButton button1 = new JButton("This is Button"); button1.setBounds(50, 30, 150, 20); mainPane.add(button1); JLabel label1 = new JLabel(""); label1.setBounds(50, 50, 150, 20); mainPane.add(label1); JTextArea textarea1 = new JTextArea("Please input something"); textarea1.setBounds(50, 110, 150, 20); mainPane.add(textarea1); setContentPane(mainPane); setVisible(true); } class MainPane extends JPanel { protected void paintComponent(Graphics g) { super.paintComponent(g); BufferedImage bi = new BufferedImage(650, 500, BufferedImage.TYPE_INT_ARGB); Graphics g2 = bi.createGraphics(); g2.setColor(Color.BLACK); g2.drawImage(image, 0, 0, this); g.drawImage(bi, 0, 0, this); } } public static void main(String[] args) { Practice pp1 = new Practice(); } } 当按testarea的时候文字会自动清空 之后按BUTTON会把testarea的字显示在label上 应该要怎样写才好
理由を知りたい、理由が知りたい 有什麽分别? 不是を+XXたい的吗? 但刚刚看到有理由が知りたい 想看这两者的分别
问一个SWING的问题 import java.awt.*; import java.awt.image.BufferedImage; import javax.swing.*; import javax.imageio.ImageIO; import java.io.File; import java.io.IOException; public class Practice extends JFrame { int width = Toolkit.getDefaultToolkit().getScreenSize().width; int height = Toolkit.getDefaultToolkit().getScreenSize().height; BufferedImage image = null; String message = "i am word"; public Practice() { this.setTitle("I am title"); this.setSize(500, 500); this.setLocation((width - 500) / 2, (height - 500) / 2); this.setResizable(false); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); try { image = ImageIO.read(new File("D:/Java/image/allgray.jpg")); } catch (IOException e) { e.printStackTrace(); } this.repaint(); } public void simplewidget() { Container container = getContentPane(); container.setLayout(null); JButton button1 = new JButton("This is Button"); button1.setBounds(50, 30, 150, 20); container.add(button1); Label label1 = new Label("This is Label"); label1.setBounds(50, 50, 150, 20); container.add(label1); JCheckBox checkbox1 = new JCheckBox("This is Checkbox"); checkbox1.setBounds(50, 70, 150, 20); container.add(checkbox1); JRadioButton radiobutton1 = new JRadioButton("This is Radiobutton"); radiobutton1.setBounds(50, 90, 150, 20); container.add(radiobutton1); JTextArea textarea1 = new JTextArea("This is TextArea"); textarea1.setBounds(50, 110, 150, 20); container.add(textarea1); setVisible(true); } public void paint(Graphics g) { BufferedImage bi = new BufferedImage(650, 500, BufferedImage.TYPE_INT_ARGB); Graphics g2 = bi.createGraphics(); g2.setColor(Color.BLACK); g2.drawImage(image, 0, 0, this); g2.drawString(message, 50, 200); g.drawImage(bi, 0, 0, this); } public static void main(String[] args) { Practice pp1 = new Practice(); pp1.simplewidget(); } }图片在附图 想问一下在加了图片之后 显示的工具元件都会怪怪的 要用滑鼠扫过才能显示.. 求解决方法
遇到一个奇怪的问题 import java.awt.*; import javax.swing.*; public class Practice { JFrame frame = new JFrame(); String[] name = { "Input", "Output", "hint...", "New", "Load", "Save", "Encode", "Decode", "Clear", "Copy" }; public void run() { frame.setSize(600, 160); frame.setLayout(new GridBagLayout()); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); JLabel n0 = new JLabel(name[0]); GridBagConstraints c0 = new GridBagConstraints(); c0.gridx = 0; c0.gridy = 0; c0.gridwidth = 1; c0.gridheight = 1; c0.weightx = 0; c0.weighty = 0; c0.fill = GridBagConstraints.NONE; c0.anchor = GridBagConstraints.WEST; frame.add(n0, c0); JLabel n1 = new JLabel(name[1]); GridBagConstraints c1 = new GridBagConstraints(); c1.gridx = 0; c1.gridy = 1; c1.gridwidth = 1; c1.gridheight = 1; c1.weightx = 0; c1.weighty = 0; c1.fill = GridBagConstraints.NONE; c1.anchor = GridBagConstraints.WEST; frame.add(n1, c1); JLabel n2 = new JLabel(name[2]); GridBagConstraints c2 = new GridBagConstraints(); c2.gridx = 0; c2.gridy = 3; c2.gridwidth = 1; c2.gridheight = 1; c2.weightx = 0; c2.weighty = 0; c2.fill = GridBagConstraints.BOTH; c2.anchor = GridBagConstraints.WEST; frame.add(n2, c2); JTextField n3 = new JTextField(); GridBagConstraints c3 = new GridBagConstraints(); c3.gridx = 1; c3.gridy = 0; c3.gridwidth = 6; c3.gridheight = 1; c3.weightx = 0; c3.weighty = 0; c3.fill = GridBagConstraints.BOTH; c3.anchor = GridBagConstraints.WEST; frame.add(n3, c3); JTextField n4 = new JTextField(); GridBagConstraints c4 = new GridBagConstraints(); c4.gridx = 1; c4.gridy = 1; c4.gridwidth = 6; c4.gridheight = 1; c4.weightx = 0; c4.weighty = 0; c4.fill = GridBagConstraints.BOTH; c4.anchor = GridBagConstraints.WEST; frame.add(n4, c4); for (int i = 0; i < 7; i++) { JButton n5 = new JButton(name[i + 3]); GridBagConstraints c5 = new GridBagConstraints(); c5.gridx = i; c5.gridy = 2; c5.gridwidth = 1; c5.gridheight = 1; c5.weightx = 0; c5.weighty = 0; c5.fill = GridBagConstraints.BOTH; c5.anchor = GridBagConstraints.CENTER; frame.add(n5, c5); } } public static void main(String[] args) { Practice gui = new Practice(); gui.run(); } } 执行的时候有时候没问题 但有时候textfield会变长或缩小 有时候甚至连testfield都不见了 为什麽会这样?
为什麽日文吧的友情贴吧是”别人的失败就是我的快乐啦”。。 为什麽日文吧的友情贴吧是”别人的失败就是我的快乐啦” 这样对於一个和外国人交流的地方来说不太好吧 对於其他人来说会对我们有误会吧
求多线程倒数用法 import java.awt.Color; import java.awt.Graphics; import java.awt.Toolkit; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; import javax.swing.JFrame; public class Practice extends JFrame implements MouseListener, Runnable { int width = Toolkit.getDefaultToolkit().getScreenSize().width; int height = Toolkit.getDefaultToolkit().getScreenSize().height; BufferedImage image = null; Thread t = new Thread(this); int maxTime = 20; public void simpleFrame() { this.setTitle("I am title"); this.setSize(500, 500); this.setLocation((width - 500) / 2, (height - 500) / 2); this.setResizable(false); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.addMouseListener(this); this.setVisible(true); t.start(); this.repaint(); } public void paint(Graphics g) { BufferedImage bi = new BufferedImage(650, 500, BufferedImage.TYPE_INT_ARGB); Graphics g2 = bi.createGraphics(); g2.setColor(Color.lightGray); g2.fillRect(0, 0, bi.getWidth(), bi.getHeight()); g2.setColor(Color.BLACK); g2.drawString("" + maxTime, 50, 200); g.drawImage(bi, 0, 0, this); } public void mouseClicked(MouseEvent e) { } public void mouseEntered(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void mousePressed(MouseEvent e) { } public void mouseReleased(MouseEvent e) { } public static void main(String[] args) { Practice gg = new Practice(); gg.simpleFrame(); } public void run() { this.repaint(); try { maxTime--; Thread.sleep(1000); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } 求视窗里的数字20 想用多线程每秒减1 直到0 之后会印出”倒数结束” 求高手指教
想问有人有这两张图吗? 想问有人有这两张的大图吗? 求高手提供
java转exe档 执行时命令提示字元显示1秒就消失问题 随便写了个java印helloworld的程式 之后转成exe档 但是执行时显示一秒就没了 求解决方法
想问个JFrame防文字重叠问题 package PPP; import java.awt.Color; import java.awt.Graphics; import java.awt.Toolkit; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.image.BufferedImage; import javax.swing.JFrame; public class Practice2 extends JFrame implements MouseListener { int width = Toolkit.getDefaultToolkit().getScreenSize().width; int height = Toolkit.getDefaultToolkit().getScreenSize().height; BufferedImage image = null; String message = "i am word"; int pressCount = 0; public void simpleFrame() { this.setTitle("I am title"); this.setSize(500, 500); this.setLocation((width - 500) / 2, (height - 500) / 2); this.setResizable(false); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.setBackground(Color.lightGray); this.addMouseListener(this); this.setVisible(true); this.repaint(); } public void paint(Graphics g) { BufferedImage bi = new BufferedImage(650, 500, BufferedImage.TYPE_INT_ARGB); Graphics g2 = bi.createGraphics(); g2.setColor(Color.BLACK); g2.drawString(message, 50, 200); g.drawImage(bi, 0, 0, this); } public void mouseClicked(MouseEvent e) { } public void mouseEntered(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void mousePressed(MouseEvent e) { message = "You press " + pressCount + " time"; pressCount++; this.repaint(); } public void mouseReleased(MouseEvent e) { } public static void main(String[] args) { Practice gg = new Practice(); gg.simpleFrame(); } } 本来每按一下都会增加count 但是突然文字都重叠了 求解决文字重叠问题
SAN度めの正直にてついにTVアニメ化是什麽意思啊? SAN度め 是什麽意思? 正直にて 又是什麽文法来的 求高手教我啊
想问个关於constructor的基础问题 public class Practice2 { int num1; int num2; int num3; public Practice2(int num1, int num2, int num3) { this.num1 = num1; this.num2 = num2; this.num3 = num3; } public int getNum1() { return num1; } public void setNum1(int num1) { this.num1 = num1; } public int getNum2() { return num2; } public void setNum2(int num2) { this.num2 = num2; } public int getNum3() { return num3; } public void setNum3(int num3) { this.num3 = num3; } public void method() { System.out.println(ca1.num1 + ca2.num2); //<--- } public static void main(String[] args) { Practice2 ca1 = new Practice2(111, 222, 333); Practice2 ca2 = new Practice2(444, 555, 666); ca1.method(); System.out.println(ca1.num1 + ca2.num2); } } 有辨法可以令到ca1的num1和ca2的num2用方法相加吗?
ひねくれた是什麽意思啊? XXX先生の作品の中でもシックなのばかり持つある意味ひねくれた人间は私くらいでしょうか? 另外求这句的翻译
ひねくれた是什麽意思啊? XXX先生の作品の中でもシックなのばかり持つある意味ひねくれた人间は私くらいでしょうか? 另外想求这句的翻译
名状しがたい是什麽意思啊? 名状しがたい是什麽意思啊? 求解释啊
想问一下smurf是什麽意思啊? So make a smurf?是什麽意思啊? smurf又代表什麽?
为什麽现在都不能放code百度上??百度娘又禁了? 每次放比较多程式码的时候 就会被百度自动删除了 怎麽会这样?
想问一个mouseClicked鼠标点击的问题 其他功能没有问题 但是当mouseClicked的时候 当鼠标点击得快的时候就会感应不到 即是不会弹出hello 想问有辨法改善这个现象吗?
好像发不到文?? 试一试 打了篇长文突然消失了
问个关於showInputDialog的问题 import javax.swing.JFrame; import javax.swing.JOptionPane; public class Practice extends JFrame { public static void main(String[] args) { Practice aaa = new Practice(); String input = JOptionPane.showInputDialog("Please input something"); if (input != null) { System.out.println(input); JOptionPane.showMessageDialog(aaa, "You input: " + input); } else { JOptionPane.showMessageDialog(aaa, "Please input again"); } } } 直接按取消或是X都还可以 但直接不输入东西按确定的话 还是会把你当成有输入东西。。 求直接不输入东西按确定 会变成"Please input again"的方法
问个新手问题 为什麽印不到东西出来 public class Info { public String getInfo() { return "hello"; } } - public class TestInfo { public static void main(String[] args) { new Info().getInfo(); } } 为什麽印不到东西出来
刚学葡文 有人可以帮我回答这些选择题吗? a) _____Andréé filho do Afonso. b) ____Leonoré filha da Weng. c) _______meuspais são____Afonso e______Weng. d) ________sãoos nossos pais. e) ________éa Weng e ___________é o André. f) ________somosos pais e _________são os filhos. 求葡文高手帮忙
想问一个关於印FOR新手问题
想问一下搜寻记事本的功能应该怎样写才好? 例如记事本写上帐号和密码 之后输入帐号能够显示密码 求高手教我怎样写
想问一下搜寻记事本的功能应该怎样写才好? 例如记事本写上帐号和密码 之后打帐号能够显示密码 应该要怎样写比较好? 做来做去都做不到 求高手指教
想问一个初学者问题 public class Practice3 { public static void main(String[] args) { System.out.print("1"); System.err.print("2"); System.out.print("3"); } } 我想印出123 某中中间的2是红色字(eslipse显示) 有辨法吗?
想问一下怎样才可以印出First Second Third...到第一百 想问一下如果想印出 First time levelup Second time levelup Third time levelup ... 到第一百 要怎样做?
想问一下absorption效果有什麽用 不太明白 看翻译好像是挡魔法攻击 但又好像不是 用MP挡攻击好像又不是 这东西到底是什麽来的啊?
想问一下虚空属性的武器有什麽用啊 刚刚打到一个VOID属性的法杖 想问一下对法师有用吗?
可以开个拍卖串吗?欢迎各位放点好装布个价 最近万年上不到e hantai拍卖串 所以想开个拍卖串在这里 欢迎各位放点装备布个价
想问一下在那里比较多人拍卖? 最近有钱了 想玩玩拍卖 想问一下在那里比较多人拍卖? 求指点
想问一下打竞技场用什麽难度打最好啊? 大家觉得打竞技场用什麽难度打最好? 求指点
刚刚在商店看到一个artifact 用20000买了 是好事还是坏事? 听说artifact是好物 立刻用20000买了 求感想
想问一下例如一个熟识JAVA的人转学C++ 大约要多久时间? 想问一下例如一个熟识JAVA的人转学C++ 大约要多久时间?
只会JAVA能够做iphone游戏吗? 想问一下只会JAVA能够做iphone游戏吗?
首页
1
2
下一页