在JPanel中创建Java命令控制台 [英] Create Java Command Console in JPanel

查看:100
本文介绍了在JPanel中创建Java命令控制台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个类似于Windows命令提示符的命令控制台,命令历史等,它在JPanel中,以便可以添加到JFrame。

I want to create a "Command Console" similar to the Windows Command Prompt, with command history, etc which is in a JPanel so that it can be added to a JFrame.

我想做的是向用户提供允许他们执行命令的提示。

What I want to do is present the user with the prompt to allow them to execute commands.

我想到的是类似于BeanShell控制台,但是我找不到控制台的源代码。

What I have in mind is similar to the BeanShell Console, however I haven't be able to find the source code for the console.

推荐答案

.jar文件从 BeanShell下载页面下载到您的Java项目,并查看BeanShell doc部分 从您的应用程序调用Beanshell有关如何使用直接呼叫调用Beanshell的示例,或

To include BeanShell into your application, add the .jar-files from the BeanShell download page to your Java project and see the BeanShell doc section "Calling Beanshell from your Application" for examples how to call Beanshell with direct calls or by evaluating the commands from your shell.

另请参阅快速入门指南,了解如何使用BeanShell的其他方法和示例。

See also the Quickstart Guide for other ways and examples how to use BeanShell.

这篇关于在JPanel中创建Java命令控制台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆