Giter Club home page Giter Club logo

wilsonkilig.github.io's People

Contributors

wilsonkilig avatar

Watchers

 avatar

wilsonkilig.github.io's Issues

JTextPane在JScrollPane中不会自动换行的解决方法 - Wilsonkilig's blog

https://wilsonkilig.github.io/2021/06/17/java/JTextPane%E4%B8%8D%E4%BC%9A%E8%87%AA%E5%8A%A8%E6%8D%A2%E8%A1%8C%E7%9A%84%E8%A7%A3%E5%86%B3%E6%96%B9%E6%B3%95/#more

在编写文本编辑器时,我发现放在JScrollPane中的JTextPane在到达了编辑器的边框时不会自动切换到下一行继续输入,而是会继续横向输入,使横向滚动条展开。 在搜索后尝试解决方法是将横向滚动条禁用,既使用下面的方法: 1JscrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); 结果发

JTextPAne自动换行问题 - Wilsonkilig's blog

https://wilsonkilig.github.io/2021/06/18/java/JText%E8%87%AA%E5%8A%A8%E6%8D%A2%E8%A1%8C%E9%97%AE%E9%A2%98/

在编写文本编辑器时,我发现放在JScrollPane中的JTextPane在到达了编辑器的边框时不会自动切换到下一行继续输入,而是会继续横向输入,使横向滚动条展开。 在搜索后尝试解决方法是将横向滚动条禁用,既使用下面的方法: 1JscrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); 结果发

JFrame窗口设置在某个窗口中心 - Wilsonkilig's blog

https://wilsonkilig.github.io/2021/07/09/java/jframe%E7%AA%97%E5%8F%A3%E8%AE%BE%E7%BD%AE%E5%9C%A8%E6%9F%90%E4%B8%AA%E7%AA%97%E5%8F%A3%E4%B8%AD%E5%BF%83/

在要将JFrame使用setLocationRelativeTo()方法控制在某个组件的中间显示,我前面并没有设置新的JFrame的大小,而是使用的pack()方法自适应调节,故而方法无法获得JFrame的有效大小,就将其左上角当作他的中心. 所以在使用setLocationRelativeTo()前需要先设置当前的窗口大小。

JTextPane使用了选择方法,文本未选中问题 - Wilsonkilig's blog

https://wilsonkilig.github.io/2021/06/17/java/JTextPane%E6%96%87%E6%9C%AC%E5%85%A8%E9%80%89%E9%97%AE%E9%A2%98/

我写的文本编辑器中,使用了JTabbedPane作为菜单的入口,在点击了JTabbedPane上的按钮调用JTextPane.selectAll()方法后,文本中的内容并没有被高亮显示。 这是因为在点击了JTabbedPane上面的按钮后,焦点转移到了JTabbedPane而不在JTextPane上面。此时文本的确已经被选中,但会有选中显示,需要使用JTextPane.requestFocus()

Document无法使用UndoManager的问题解决 - Wilsonkilig's blog

https://wilsonkilig.github.io/2021/07/09/java/Document%E6%97%A0%E6%B3%95%E4%BD%BF%E7%94%A8UndoManager%E7%9A%84%E9%97%AE%E9%A2%98%E8%A7%A3%E5%86%B3/

在编写文本编译器时,要添加一个撤回重做的功能。但是HTMLDocument在使用了setEditorKit(new HTMLEditorKit)后,撤回监听器UndoableEditListenner对每一次的事件不会有任何相应。 在请教了同学之后,使用了他的方法成功解决了问题。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.