wilsonkilig / wilsonkilig.github.io Goto Github PK
View Code? Open in Web Editor NEW我的hexo博客
我的hexo博客
在编写文本编辑器时,我发现放在JScrollPane中的JTextPane在到达了编辑器的边框时不会自动切换到下一行继续输入,而是会继续横向输入,使横向滚动条展开。 在搜索后尝试解决方法是将横向滚动条禁用,既使用下面的方法: 1JscrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); 结果发
在编写文本编辑器时,我发现放在JScrollPane中的JTextPane在到达了编辑器的边框时不会自动切换到下一行继续输入,而是会继续横向输入,使横向滚动条展开。 在搜索后尝试解决方法是将横向滚动条禁用,既使用下面的方法: 1JscrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); 结果发
在要将JFrame使用setLocationRelativeTo()方法控制在某个组件的中间显示,我前面并没有设置新的JFrame的大小,而是使用的pack()方法自适应调节,故而方法无法获得JFrame的有效大小,就将其左上角当作他的中心. 所以在使用setLocationRelativeTo()前需要先设置当前的窗口大小。
我写的文本编辑器中,使用了JTabbedPane作为菜单的入口,在点击了JTabbedPane上的按钮调用JTextPane.selectAll()方法后,文本中的内容并没有被高亮显示。 这是因为在点击了JTabbedPane上面的按钮后,焦点转移到了JTabbedPane而不在JTextPane上面。此时文本的确已经被选中,但会有选中显示,需要使用JTextPane.requestFocus()
在编写文本编译器时,要添加一个撤回重做的功能。但是HTMLDocument在使用了setEditorKit(new HTMLEditorKit)后,撤回监听器UndoableEditListenner对每一次的事件不会有任何相应。 在请教了同学之后,使用了他的方法成功解决了问题。
https://wilsonkilig.github.io/2021/06/16/hello-world/
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub. Quick
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.